Java Reference
In-Depth Information
_jspx_inited = true;
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType(“text/html”);
pageContext = _jspxFactory.getPageContext(this, request, response,
“errorpage.jsp”, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// begin
out.write(“\r\n\r\n”);
// end
// begin [file=”D:\\testerror.jsp”;from=(2,2);to=(10,0)]
if ( true ) {
18
// Just throw an exception
throw new Exception(“A JSP Exception”);
}
// end
// begin
out.write(“\r\n”);
// end
}
catch (Exception ex) {
if (out.getBufferSize() != 0)
out.clear();
pageContext.handlePageException(ex);
}
finally {
out.flush();
_jspxFactory.releasePageContext(pageContext);
}
}
The first section of code you need to look at is the call to get the PageContext object from the
JspFactory , using the getPageContext() method. This method obtains an instance of an
 
Search WWH ::




Custom Search