kinman 2002/08/27 14:31:57 Modified: jasper2/src/share/org/apache/jasper/compiler Generator.java Log: - Fixed 12088: SkipPageException was handled correctly. Revision Changes Path 1.81 +13 -11 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.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- Generator.java 26 Aug 2002 23:47:47 -0000 1.80 +++ Generator.java 27 Aug 2002 21:31:57 -0000 1.81 @@ -2791,13 +2791,10 @@ */ private void generatePostamble(Node.Nodes page) { out.popIndent(); - if (pageInfo.hasTagFile()) { - // Silently catch SkipPageException - out.printil("} catch (javax.servlet.jsp.SkipPageException t) {"); - } out.printil("} catch (Throwable t) {"); out.pushIndent(); - + out.printil("if (!(t instanceof javax.servlet.jsp.SkipPageException)){"); + out.pushIndent(); out.printil("out = _jspx_out;"); out.printil("if (out != null && out.getBufferSize() != 0)"); out.pushIndent(); @@ -2805,7 +2802,8 @@ out.popIndent(); out.printil("if (pageContext != null) pageContext.handlePageException(t);"); - + out.popIndent(); + out.printil("}"); out.popIndent(); out.printil("} finally {"); out.pushIndent(); @@ -3002,10 +3000,12 @@ // helper method is declared to throw Throwable. out.printil( "} catch( Throwable t ) {" ); out.pushIndent(); + out.printil( "if( t instanceof javax.servlet.jsp.SkipPageException )" ); + out.printil( " throw (javax.servlet.jsp.SkipPageException) t;" ); out.printil( "if( t instanceof java.io.IOException )" ); - out.printil( " throw (java.io.IOException)t;" ); + out.printil( " throw (java.io.IOException) t;" ); out.printil( "if( t instanceof javax.servlet.jsp.JspException )" ); - out.printil( " throw (javax.servlet.jsp.JspException)t;" ); + out.printil( " throw (javax.servlet.jsp.JspException) t;" ); out.printil("throw new javax.servlet.jsp.JspException(t);" ); out.popIndent(); out.printil( "}" ); @@ -3424,6 +3424,8 @@ out.printil( "}" ); // try out.printil( "catch( Throwable e ) {" ); out.pushIndent(); + out.printil("if (e instanceof javax.servlet.jsp.SkipPageException)"); + out.printil(" throw (javax.servlet.jsp.SkipPageException) e;"); out.printil( "throw new javax.servlet.jsp.JspException( e );" ); out.popIndent(); out.printil( "}" ); // catch
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>