You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2009/02/27 10:21:38 UTC

svn commit: r748455 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Author: hansbak
Date: Fri Feb 27 09:21:37 2009
New Revision: 748455

URL: http://svn.apache.org/viewvc?rev=748455&view=rev
Log:
it looks like the requesthandler does deal with the default request which is required for the ofbiz cms ????DAVID????? can you please have a look if this change i made is correct?

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=748455&r1=748454&r2=748455&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 Fri Feb 27 09:21:37 2009
@@ -129,8 +129,15 @@
         String overrideViewUri = RequestHandler.getOverrideViewUri(request.getPathInfo());
         
         String requestMissingErrorMessage = "Unknown request [" + defaultRequestUri + "]; this request does not exist or cannot be called directly.";
-        
-        ConfigXMLReader.RequestMap requestMap = controllerConfig.requestMapMap.get(defaultRequestUri);
+		ConfigXMLReader.RequestMap requestMap = null;
+		if (defaultRequestUri != null) {
+			requestMap = controllerConfig.requestMapMap.get(defaultRequestUri);
+		}
+        // check for default request
+        if (requestMap == null) {
+        	requestMap = controllerConfig.requestMapMap.get(controllerConfig.defaultRequest);
+        }
+        // still not found so stop
         if (requestMap == null) {
             throw new RequestHandlerException(requestMissingErrorMessage);
         }