tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcs...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request StaticInterceptor.java
Date Mon, 12 Mar 2001 21:50:17 GMT
marcsaeg    01/03/12 13:50:16

  Modified:    src/share/org/apache/tomcat/request Tag: tomcat_32
                        StaticInterceptor.java
  Log:
  Using an HTML file (or any other static content) as the <location>
  for an <error-page> in web.xml wouldn't work.  If the <error-page>
  was for the 404 status code, the container would enter an infinite
  loop.
  
  FileHandler.service() now looks for the javax.servlet.include.request_uri
  attribute in the request and if it isn't null is uses this as the file
  to serve.
  
  PR: 291
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.7   +4 -1      jakarta-tomcat/src/share/org/apache/tomcat/request/Attic/StaticInterceptor.java
  
  Index: StaticInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/Attic/StaticInterceptor.java,v
  retrieving revision 1.7.2.6
  retrieving revision 1.7.2.7
  diff -u -r1.7.2.6 -r1.7.2.7
  --- StaticInterceptor.java	2000/12/12 20:33:46	1.7.2.6
  +++ StaticInterceptor.java	2001/03/12 21:50:16	1.7.2.7
  @@ -332,7 +332,10 @@
   	    subReq=req.getChild();
   
   	Context ctx=subReq.getContext();
  -	String pathInfo=subReq.getServletPath();
  +   // If this file is being included, use javax.servlet.include.request_uri.
  +   String pathInfo = (String)subReq.getAttribute("javax.servlet.include.request_uri");
  +   if(pathInfo == null)
  +      pathInfo=subReq.getServletPath();
   	String absPath = (String)subReq.getNote( realFileNote );
   	if( absPath==null ) 
   	    absPath=ctx.getRealPath( pathInfo );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Mime
View raw message