Java Reference
In-Depth Information
</BODY>
</HTML>
It has a very simple scriptlet section that will print HELLO JSP WORLD to the JspWriter implicit
object out . The actual servlet code, resulting from the initial request, would look similar to the
following code snippet:
public void _jspService(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
jspx_init();
jspx_inited = true;
}
jspxFactory = JspFactory.getDefaultFactory();
response.setContentType(“text/html”);
pageContext = _jspxFactory.getPageContext(this,
request, response,
“”, true, 8192, true);
14
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// begin
out.write(“<HTML>\r\n<BODY>\r\n\r\n”);
// end
// begin [file=”D:\\HelloJsp.jsp”;from=(3,2);to=(3,35)]
out.println(“HELLO JSP WORLD”);
// end
// begin
out.write(“\r\n\r\n</BODY>\r\n</HTML>\r\n”);
// end
 
Search WWH ::




Custom Search