ekbush 2002/12/25 01:01:46
Modified: src/share/org/apache/struts/action ExceptionHandler.java
Log:
Make ExceptionHandler obey the controller's inputForward rule. Also, create
ActionError instance by passing ex.getMessage() as the first replacement
parameter.
PR: 12871
Revision Changes Path
1.14 +3 -4
jakarta-struts/src/share/org/apache/struts/action/ExceptionHandler.java
Index: ExceptionHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ExceptionHandler.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ExceptionHandler.java 24 Dec 2002 05:30:07 -0000 1.13
+++ ExceptionHandler.java 25 Dec 2002 09:01:46 -0000 1.14
@@ -101,18 +101,17 @@
// or from the form input
if (ae.getPath() != null) {
forward = new ActionForward(ae.getPath());
+ forward.setContextRelative(true);
} else {
- forward = new ActionForward(mapping.getInput());
+ forward = mapping.getInputForward();
}
- forward.setContextRelative(true);
-
// Figure out the error
if (ex instanceof ModuleException) {
error = ((ModuleException) ex).getError();
property = ((ModuleException) ex).getProperty();
} else {
- error = new ActionError(ae.getKey());
+ error = new ActionError(ae.getKey(), ex.getMessage());
property = error.getKey();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>