MCPcopy Index your code
hub / github.com/apache/tomcat / generatePostamble

Method generatePostamble

java/org/apache/jasper/compiler/Generator.java:3317–3357  ·  view source on GitHub ↗

Generates the ending part of the static portion of the servlet.

()

Source from the content-addressed store, hash-verified

3315 * Generates the ending part of the static portion of the servlet.
3316 */
3317 private void generatePostamble() {
3318 out.popIndent();
3319 out.printil("} catch (java.lang.Throwable t) {");
3320 out.pushIndent();
3321 out.printil("if (!(t instanceof jakarta.servlet.jsp.SkipPageException)){");
3322 out.pushIndent();
3323 out.printil("out = _jspx_out;");
3324 out.printil("if (out != null && out.getBufferSize() != 0)");
3325 out.pushIndent();
3326 out.printil("try {");
3327 out.pushIndent();
3328 out.printil("if (response.isCommitted()) {");
3329 out.pushIndent();
3330 out.printil("out.flush();");
3331 out.popIndent();
3332 out.printil("} else {");
3333 out.pushIndent();
3334 out.printil("out.clearBuffer();");
3335 out.popIndent();
3336 out.printil("}");
3337 out.popIndent();
3338 out.printil("} catch (java.io.IOException e) {}");
3339 out.popIndent();
3340 out.printil("if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);");
3341 out.printil("else throw new ServletException(t);");
3342 out.popIndent();
3343 out.printil("}");
3344 out.popIndent();
3345 out.printil("} finally {");
3346 out.pushIndent();
3347 out.printil("_jspxFactory.releasePageContext(_jspx_page_context);");
3348 out.popIndent();
3349 out.printil("}");
3350
3351 // Close the service method
3352 out.popIndent();
3353 out.printil("}");
3354
3355 // Generated methods, helper classes, etc.
3356 genCommonPostamble();
3357 }
3358
3359 /**
3360 * Constructor.

Callers 1

generateMethod · 0.95

Calls 4

genCommonPostambleMethod · 0.95
popIndentMethod · 0.80
pushIndentMethod · 0.80
printilMethod · 0.45

Tested by

no test coverage detected