billbarker 02/04/15 20:04:55 Modified: src/share/org/apache/tomcat/modules/generators StaticInterceptor.java Log: Fix a problem where Tomcat was displaying the source of a JSP page. This was reported against 4.0 as bug #8092. To reproduce, download the webapp attached to the bug and request .../jsp/including.jsp. Reported by: Andreas Junghans [EMAIL PROTECTED] Revision Changes Path 1.20 +5 -1 jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java Index: StaticInterceptor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- StaticInterceptor.java 18 Feb 2002 04:05:28 -0000 1.19 +++ StaticInterceptor.java 16 Apr 2002 03:04:55 -0000 1.20 @@ -307,8 +307,12 @@ // Use "javax.servlet.include.servlet_path" for path if defined. // ErrorHandler places the path here when invoking an error page. String pathInfo = (String)subReq.getAttribute("javax.servlet.include.servlet_path"); - if(pathInfo == null) + if(pathInfo == null) { + // If the attribute isn't there, then we aren't included. + // In that case, we must use the real request. + subReq = req; pathInfo=subReq.servletPath().toString(); + } String absPath = (String)subReq.getNote( realFileNote ); if( absPath==null ) absPath=FileUtil.safePath( context.getAbsolutePath(),
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>