craigmcc 2002/06/22 15:19:13
Modified: src/share/org/apache/struts/util RequestUtils.java
Log:
Make selectApplication() work correctly when running in the target of a
RequestDispatcher.include() call (including use inside Tiles).
PR: Bugzilla #8768
Submitted by: Ian Tomey <ian.tomey at lomardrisk.com>
Revision Changes Path
1.39 +10 -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.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- RequestUtils.java 16 Jun 2002 05:56:05 -0000 1.38
+++ RequestUtils.java 22 Jun 2002 22:19:13 -0000 1.39
@@ -97,6 +97,7 @@
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.ActionServletWrapper;
import org.apache.struts.action.DynaActionFormClass;
+import org.apache.struts.action.RequestProcessor;
import org.apache.struts.config.ApplicationConfig;
import org.apache.struts.config.FormBeanConfig;
import org.apache.struts.taglib.html.Constants;
@@ -1262,7 +1263,11 @@
ServletContext context) {
// Acquire the path used to compute the sub-application
- String matchPath = request.getServletPath();
+ String matchPath = (String)
+ request.getAttribute(RequestProcessor.INCLUDE_SERVLET_PATH);
+ if (matchPath == null) {
+ matchPath = request.getServletPath();
+ }
// Match against the list of sub-application prefixes
String prefix = "";
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>