jfarcand    2002/12/13 13:38:07

  Modified:    jasper2/src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  Fix a bug when <jsp-property-group>/<url-matching> is used. Since JSPs doesn't need 
to be defined with a <servlet-name> element, Catalina doesn't know anything about the 
JSP and will match a request using the path prefix information. Then Jasper needs to 
recreate the proper url in order to deserve the request.
  
  Revision  Changes    Path
  1.15      +12 -3     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JspServlet.java   3 Dec 2002 02:08:31 -0000       1.14
  +++ JspServlet.java   13 Dec 2002 21:38:06 -0000      1.15
  @@ -212,6 +212,15 @@
               } else {
                   jspUri = includeUri;
               }
  +                                
  +            // When jsp-property-group/url-matching is used, and when the 
  +            // jsp is not defined with <servlet-name>, the url
  +            // as to be passed as it is to the JSP container (since Catalina
  +            // doesn't know anything about the requested JSP 
  +            if(request.getServletPath().indexOf(".") == -1 &&  
request.getPathInfo() != null){
  +                jspUri = request.getServletPath() + request.getPathInfo();
  +            }
  +            
               String jspFile = (String) request.getAttribute(Constants.JSP_FILE);
               if (jspFile != null) {
                   jspUri = jspFile;
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to