craigmcc 2003/02/08 15:31:30
Modified: conf/share struts-config_1_1.dtd
src/share/org/apache/struts/action ExceptionHandler.java
src/share/org/apache/struts/config ExceptionConfig.java
src/share/org/apache/struts/util RequestUtils.java
Log:
There was a discrepancy between the description of the "path" parameter
on an <exception> element between the DTD (which said "module relative")
and the ExceptionConfig class (which said "context relative"). Making it
module relative is the right answer, so correct the documentation discrepancy
and the behavior of ExceptionHandler when it configures an ActionForward
to be processed.
A side effect of this change is that the included path will be processed
through any "forwardPattern" property you have set on the <controller>
element.
Revision Changes Path
1.37 +11 -5 jakarta-struts/conf/share/struts-config_1_1.dtd
Index: struts-config_1_1.dtd
===================================================================
RCS file: /home/cvs/jakarta-struts/conf/share/struts-config_1_1.dtd,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- struts-config_1_1.dtd 7 Feb 2003 07:00:49 -0000 1.36
+++ struts-config_1_1.dtd 8 Feb 2003 23:31:29 -0000 1.37
@@ -374,13 +374,19 @@
forward Module-relative path of the servlet or other resource that
will process this request, instead of the Action class
- specified by "type". Exactly one of "forward", "include",
- or "type" must be specified.
+ specified by "type". The specified path will be processed
+ through the "forwardPattern" attribute that is configured
+ on the "controller" element for this application module.
+ Exactly one of "forward", "include", or "type" must be
+ specified.
include Module-relative path of the servlet or other resource that
will process this request, instead of the Action class
- specified by "type". Exactly one of "forward", "include", or
- "type" must be specified.
+ specified by "type". The specified path will be processed
+ through the "includePattern" attribute that is configured
+ on the "controller" element for this application module.
+ Exactly one of "forward", "include", or "type" must be
+ specified.
input Module-relative path of the action or other resource to
which control should be returned if a validation error is
1.16 +1 -2
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.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ExceptionHandler.java 7 Jan 2003 06:32:25 -0000 1.15
+++ ExceptionHandler.java 8 Feb 2003 23:31:29 -0000 1.16
@@ -101,9 +101,8 @@
// or from the form input
if (ae.getPath() != null) {
forward = new ActionForward(ae.getPath());
- forward.setContextRelative(true);
} else {
- forward = mapping.getInputForward();
+ forward = mapping.getInputForward();
}
// Figure out the error
1.6 +5 -5
jakarta-struts/src/share/org/apache/struts/config/ExceptionConfig.java
Index: ExceptionConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ExceptionConfig.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ExceptionConfig.java 9 Jul 2002 23:57:37 -0000 1.5
+++ ExceptionConfig.java 8 Feb 2003 23:31:29 -0000 1.6
@@ -147,7 +147,7 @@
/**
- * The context-relative path of the resource to forward to if this
+ * The module-relative path of the resource to forward to if this
* exception occurs during an <code>Action</code>.
*/
protected String path = null;
1.85 +6 -5
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
Index: RequestUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- RequestUtils.java 8 Feb 2003 22:12:09 -0000 1.84
+++ RequestUtils.java 8 Feb 2003 23:31:30 -0000 1.85
@@ -1450,8 +1450,9 @@
}
+
/**
- * Return the context-relative URL that corresponds to the specified
+ * <p>Return the context-relative URL that corresponds to the specified
* <code>page</code> attribute value, calculated based on the
* <code>pagePattern</code> property of the current module's
* {@link ModuleConfig}.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]