2014-08-26 17:32 GMT+04:00  <ma...@apache.org>:
> Author: markt
> Date: Tue Aug 26 13:32:45 2014
> New Revision: 1620596
>
> URL: http://svn.apache.org/r1620596
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56568
> Enable any HTTP method to be used to request a JSP page that has the 
> isErrorPage page directive set to true.
>
> Added:
>     tomcat/trunk/test/webapp/jsp/error.jsp   (with props)
> Modified:
>     tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java
>     tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
>     tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
>     tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java
>     tomcat/trunk/webapps/docs/changelog.xml
> Modified: tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java?rev=1620596&r1=1620595&r2=1620596&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java (original)
> +++ tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java Tue Aug 26 
> 13:32:45 2014
> @@ -255,6 +255,11 @@ public abstract class Compiler {
>              // to be GC'd and save memory.
>              ctxt.setWriter(null);
>
> +            // Need to know if the JSP is an error page at runtime to 
> determine
> +            // which HTTP methods are permitted. Error pages permit any. 
> Normal
> +            // pages only permit GET, POST or HEAD.
> +            jsw.setErrorPage(pageInfo.isErrorPage());
> +

Apparently this causes org.apache.jasper.TestJspC to fail with many NPEs,
as noted by  Gump in tomcat-trunk-test-nio:

    [junit] java.lang.NullPointerException
    [junit] at 
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:261)
    [junit] at org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
    [junit] at org.apache.jasper.JspC.processFile(JspC.java:1217)

All other test cases completed successfully.


>              if (log.isDebugEnabled()) {
>                  t4 = System.currentTimeMillis();
>                  log.debug("Generated " + javaFileName + " total=" + (t4 - t1)
>

(....)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to