tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
Date Tue, 23 Mar 2004 01:56:40 GMT
luehe       2004/03/22 17:56:40

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  Return 500 error code if JSP error page mechanism is invoked (the current impl used to return
200)
  
  Revision  Changes    Path
  1.226     +6 -0      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.225
  retrieving revision 1.226
  diff -u -r1.225 -r1.226
  --- Generator.java	23 Mar 2004 00:06:07 -0000	1.225
  +++ Generator.java	23 Mar 2004 01:56:39 -0000	1.226
  @@ -556,6 +556,12 @@
           if (pageInfo.isErrorPage()) {
               out.printil(
                   "Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);");
  +            out.printil("if (exception != null) {");
  +            out.pushIndent();
  +            out.printil(
  +                "response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);");
  +            out.popIndent();
  +            out.printil("}");
           }
   
           out.printil("ServletContext application = null;");
  
  
  

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


Mime
View raw message