Synopsis of 5169:

   JavaServer Pages Specification 1.2, Section JSP.8.4.2:

   The "jsp_precompile" parameter may have no value, or may
   have the values "true" or "false".  In all cases, the 
   request should not be delivered to the JSP page.

   With Tomcat, if the jsp_precompile parameter is false, the 
   request is delivered to the target JSP page.  This is a 
   violation of the spec.

The issue seems to lie in org/apache/jasper/servlet/JspServlet.java.

During the processing of the request parameters, if the jsp_precompile
value evaluated to false, the preCompile method would return false.
Because of this, the service method in the JspServletWrapper class
would not return as the precompile value passed was false.

The attached simple patch seems to resolve the issue running what tests
I have.

Comments welcome.

Thanks,

-rl

Index: JspServlet.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
retrieving revision 1.24
diff -u -r1.24 JspServlet.java
--- JspServlet.java     2001/11/28 17:26:08     1.24
+++ JspServlet.java     2001/11/28 21:40:18
@@ -422,7 +422,7 @@
         if (value.equals("true"))
             return (true);             // ?jsp_precompile=true
         else if (value.equals("false"))
-            return (false);            // ?jsp_precompile=false
+            return (true);            // ?jsp_precompile=false
         else
             throw new ServletException("Cannot have request parameter " +
                                        Constants.PRECOMPILE + " set to " +

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

Reply via email to