    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.

##

SimpleServlet()

##

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

##

SimpleServlet

     public SimpleServlet()

##

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