Java Reference
In-Depth Information
// end
// begin [file=”D:\\hello.jsp”;from=(7,6);to=(10,4)]
// Print a simple message in the client area.
out.println(“<center><b>Hello!</b></center>”);
// end
// begin
out.write(“\r\n </body>\r\n</html>\r\n”);
// end
}
catch (Exception ex) {
if (out.getBufferSize() != 0)
out.clear();
pageContext.handlePageException(ex);
}
finally {
out.flush();
_jspxFactory.releasePageContext(pageContext);
}
}
N
OTE
To run these examples, you will need to copy the JSP files from each of the following
listings to the
<
SERVER_ROOT
>/djs/
directory.
The
request
Object
The implicit object
request
represents the
javax.servlet.http.HttpServletRequest
object
that is passed into the generated
_jspService()
method. The
HttpServletRequest
interface
defines an object that provides access to HTTP-protocol-specific header information sent by
the client. You can see how it is passed in the following code snippet:
15
public void _jspService(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {