svn commit: r497883 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r497883 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java

jaz-3
Author: jaz
Date: Fri Jan 19 09:31:52 2007
New Revision: 497883

URL: http://svn.apache.org/viewvc?view=rev&rev=497883
Log:
fixed problem with root context; the control path would come back as //control instead of /control; big problem just not getting noticed

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

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?view=diff&rev=497883&r1=497882&r2=497883
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Fri Jan 19 09:31:52 2007
@@ -125,7 +125,11 @@
         }
 
         // Setup the CONTROL_PATH for JSP dispatching.
-        request.setAttribute("_CONTROL_PATH_", request.getContextPath() + request.getServletPath());
+        String contextPath = request.getContextPath();
+        if (contextPath == null || "/".equals(contextPath)) {
+            contextPath = "";
+        }
+        request.setAttribute("_CONTROL_PATH_", contextPath + request.getServletPath());
         if (Debug.verboseOn())
             Debug.logVerbose("Control Path: " + request.getAttribute("_CONTROL_PATH_"), module);