You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ak...@locus.apache.org on 2000/04/05 20:42:03 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime PageContextImpl.java
akv 00/04/05 11:42:03
Modified: src/share/org/apache/jasper/runtime PageContextImpl.java
Log:
Fix for Bug 108, submitted by Larry.Isaacs@sas.com.
PageContextImpl.getAbsolutePathRelativeToContext did not consider the fact
that this could be an included request. If this is an included request then
we need to use the request attribute javax.servlet.include.servlet_path to
make a / rooted path. In the past we were just using request.getServletPath
to make a / rooted path.
Revision Changes Path
1.7 +6 -4 jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java
Index: PageContextImpl.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PageContextImpl.java 2000/02/04 01:22:12 1.6
+++ PageContextImpl.java 2000/04/05 18:42:03 1.7
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v 1.6 2000/02/04 01:22:12 mandar Exp $
- * $Revision: 1.6 $
- * $Date: 2000/02/04 01:22:12 $
+ * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v 1.7 2000/04/05 18:42:03 akv Exp $
+ * $Revision: 1.7 $
+ * $Date: 2000/04/05 18:42:03 $
*
* ====================================================================
*
@@ -333,7 +333,9 @@
String path = relativeUrlPath;
if (!path.startsWith("/")) {
- String uri = ((HttpServletRequest) request).getServletPath();
+ String uri = (String) request.getAttribute("javax.servlet.include.servlet_path");
+ if (uri == null)
+ uri = ((HttpServletRequest) request).getServletPath();
String baseURI = uri.substring(0, uri.lastIndexOf('/'));
path = baseURI+'/'+path;
}