Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.servlet.http
Class HttpServlet

    java.lang.Object
      javax.servlet.http.HttpServlet

    public abstract class HttpServlet

extends Object

Provides an abstract class to be subclassed to create an HTTP servlet suitable for a lejos Web Server. A subclass of `HttpServlet` must override at least one method. The only method currently suported by lejos is:

- `doGet`, for HTTP GET requests

lejos currently supports a single Servlet. You call the parameterless constructor to create the Servlet, and call th inti() method to start the Web Server. It loops forever processing GET requests. All paths are mapped onto this single servlet.

Author:
  Lawrie Griffiths

Constructor Summary
`HttpServlet()`

Method Summary
`abstract void` | `doGet(HttpServletRequest request, HttpServletResponse response)` doGet must be overridden to allow your Servlet to process GET requests
`void` | `init()` Initialize the HTTP servlet

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait`

Constructor Detail

### HttpServlet

    public HttpServlet()

Method Detail

### init

    public void init()
              throws IOException

  Initialize the HTTP servlet

  Throws:
    `IOException` - if an input or output error occurs

### doGet

    public abstract void doGet(HttpServletRequest request,
                               HttpServletResponse response)
                        throws IOException

  doGet must be overridden to allow your Servlet to process GET requests

  Parameters:
    `request` - the request object that is passed to the servlet
    `response` - the response object that the servlet uses to return the headers to the client
  Throws:
    `IOException` - if an input or output error occurs
    `ServletException` - not used in lejos version

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD