Author: jleroux
Date: Wed Jan 28 15:41:07 2015
New Revision: 1655367

URL: http://svn.apache.org/r1655367
Log:
Commits small RequestHandler.java changes after r1535432 (related with 
OFBIZ-5312)
This is in preparation of the SEO branch merging, still WIP but should be soon

Modified:
    
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Modified: 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1655367&r1=1655366&r2=1655367&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java 
(original)
+++ 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java 
Wed Jan 28 15:41:07 2015
@@ -862,7 +862,7 @@ public class RequestHandler {
     }
     private void renderView(String view, boolean allowExtView, 
HttpServletRequest req, HttpServletResponse resp, String saveName) throws 
RequestHandlerException {
         GenericValue userLogin = (GenericValue) 
req.getSession().getAttribute("userLogin");
-        // workaraound if we are in the root webapp
+        // workaround if we are in the root webapp
         String cname = UtilHttp.getApplicationName(req);
         String oldView = view;
 
@@ -873,12 +873,11 @@ public class RequestHandler {
         // if the view name starts with the control servlet name and a /, then 
it was an
         // attempt to override the default view with a call back into the 
control servlet,
         // so just get the target view name and use that
-        
         String servletName = req.getServletPath();
-        if (servletName.startsWith("/")) {
+        if (UtilValidate.isNotEmpty(servletName) && servletName.length() > 1 
|| servletName.startsWith("/")) {
             servletName = servletName.substring(1);
         }
-
+        
         if (Debug.infoOn()) Debug.logInfo("Rendering View [" + view + "], 
sessionId=" + UtilHttp.getSessionId(req), module);
         if (view.startsWith(servletName + "/")) {
             view = view.substring(servletName.length() + 1);


Reply via email to