Typical Servlet Structure
Here is a TYPICAL SERVLET
STRUCTURE.
- doGet handles HTTP GET requests.
- HttpServletRequest
is a Java object that allows access to incoming information such as
FORM data and HTTP request headers.
- HttpServletResponse
is a Java object that allows you to specify HTTP response headers
such as content type and cookies.
- HttpServletResponse also provides a PrintWriter used to
send output back to the client, primarily HTML code.