if an override view is specified in a url and it does not exist, it will not generate a 404 return code but will display an error. this change will do this. example url: http://localhost:8080/ecommerce/control/main/aaa

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1225746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2011-12-30 03:22:36 +00:00
parent 532a8594b7
commit d9414ad2b3
@@ -139,6 +139,18 @@ public class RequestHandler {
requestMap = requestMapMap.get(defaultRequest);
}
}
// check for override view
if (overrideViewUri != null) {
ConfigXMLReader.ViewMap viewMap = getControllerConfig().getViewMapMap().get(overrideViewUri);
if (viewMap == null) {
String defaultRequest = controllerConfig.getDefaultRequest();
if (defaultRequest != null) { // required! to avoid a null pointer exception and generate a requesthandler exception if default request not found.
requestMap = requestMapMap.get(defaultRequest);
}
}
}
// still not found so stop
if (requestMap == null) {
throw new RequestHandlerException(requestMissingErrorMessage);