All Examples  This Package

Class examples.servlets.SimpleServlet

java.lang.Object
   |
   +----javax.servlet.GenericServlet
           |
           +----javax.servlet.http.HttpServlet
                   |
                   +----examples.servlets.SimpleServlet

public class SimpleServlet
extends HttpServlet
This is a simple example of an HTTP Servlet. It responds to the GET and HEAD methods of the HTTP protocol.


Constructor Index

 o SimpleServlet()

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
Handle the GET and HEAD methods by building a simple web page.

Constructors

 o SimpleServlet
 public SimpleServlet()

Methods

 o doGet
 public void doGet(HttpServletRequest request,
                   HttpServletResponse response) throws ServletException, IOException
Handle the GET and HEAD methods by building a simple web page. HEAD is just like GET, except that the server returns only the headers (including content length) not the body we write.

Overrides:
doGet in class HttpServlet

All Examples  This Package