Author: mrdon
Date: Sun Oct  1 20:54:36 2006
New Revision: 451869

URL: http://svn.apache.org/viewvc?view=rev&rev=451869
Log:
Better handle when no result, probably due to an error
WW-1453

Modified:
    
struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp

Modified: 
struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp?view=diff&rev=451869&r1=451868&r2=451869
==============================================================================
--- 
struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp 
(original)
+++ 
struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp 
Sun Oct  1 20:54:36 2006
@@ -13,7 +13,10 @@
     if (inv != null) {
         sourceUrl += 
"?config="+inv.getProxy().getConfig().getLocation().getURI()+":"+inv.getProxy().getConfig().getLocation().getLineNumber();
         sourceUrl += "&className="+inv.getProxy().getConfig().getClassName();
-        sourceUrl += 
"&page="+mapping.getNamespace()+"/"+((org.apache.struts2.dispatcher.StrutsResultSupport)inv.getResult()).getLastFinalLocation();
+        
+        if (inv.getResult() != null && inv.getResult() instanceof 
org.apache.struts2.dispatcher.StrutsResultSupport) {
+               sourceUrl += 
"&page="+mapping.getNamespace()+"/"+((org.apache.struts2.dispatcher.StrutsResultSupport)inv.getResult()).getLastFinalLocation();
+        }
     } else {
         sourceUrl += "?page="+request.getServletPath();
     }


Reply via email to