This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/trunk by this push:
new 80e545c Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
80e545c is described below
commit 80e545c0f8c83933f099ce2a16717b32a901074a
Author: Jacques Le Roux <
[hidden email]>
AuthorDate: Sat Jul 18 11:12:35 2020 +0200
Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
We no longer have "/error/error.jsp" file,
so always use "common/webcommon/error/Error.ftl" by default
---
.../main/java/org/apache/ofbiz/webapp/control/RequestHandler.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index 517599a..84ec236 100644
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@ -796,8 +796,9 @@ public class RequestHandler {
return eventReturn;
}
- /** Returns the default error page for this request. */
- public String getDefaultErrorPage(HttpServletRequest request) {
+ /** Returns the default error page for this request.
+ * @throws MalformedURLException */
+ public String getDefaultErrorPage(HttpServletRequest request) throws MalformedURLException {
URL errorPage = null;
try {
String errorPageLocation = getControllerConfig().getErrorpage();
@@ -806,7 +807,7 @@ public class RequestHandler {
Debug.logError(e, "Exception thrown while parsing controller.xml file: ", MODULE);
}
if (errorPage == null) {
- return "/error/error.jsp";
+ return FlexibleLocation.resolveLocation("component://common/webcommon/error/Error.ftl").toString();
}
return errorPage.toString();
}