: Class DispatchServlet

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

## com.mortbay.Servlets
Class DispatchServlet

    java.lang.Object
      |
      +--javax.servlet.GenericServlet
            |
            +--javax.servlet.http.HttpServlet
                  |
                  +--com.mortbay.Servlets.DispatchServlet

public class DispatchServlet
extends javax.servlet.http.HttpServlet
implements ServletDispatchHandler

See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `lookAndFeelName`
`protected java.lang.String` | `name`

Constructor Summary
`DispatchServlet(java.lang.String name)`

Method Summary
`java.lang.Object` | `defaultDispatch(java.lang.String method, ServletDispatch dispatch, java.lang.Object context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)` Handle an unmatched method
`java.lang.String` | `getServletInfo()` Returns a `String` that contains information about the servlet such as its author, version, and copyright information.
`void` | `init(javax.servlet.ServletConfig config)` Initializes this servlet.
`void` | `service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)` Receives standard HTTP requests from the public `service` method and dispatches them to the `do`xxx methods defined in this class.

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service`

Methods inherited from class javax.servlet.GenericServlet
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, log, log`

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

Field Detail

### lookAndFeelName

    protected java.lang.String lookAndFeelName

### name

    protected java.lang.String name

Constructor Detail

### DispatchServlet

    public DispatchServlet(java.lang.String name)

Method Detail

### init

    public void init(javax.servlet.ServletConfig config)
              throws javax.servlet.ServletException

  Description copied from class: javax.servlet.GenericServlet
  Initializes this servlet.

  The servlet engine calls this method once, automatically, each time it loads the servlet. This method is guaranteed to finish before the servlet accepts any requests to its `service` method. If a fatal error occurs while the servlet is being initialized, the servlet engine should throw an `UnavailableException`, rather than calling the `System.exit` method.

  The `init` method stores the `ServletConfig` object it receives from the servlet engine. If you override `init`, you should either call `super.init` or store the `ServletConfig` object in the new `init` method. If you decide to store the `ServletConfig` object in a different location, you should also override the `GenericServlet.getServletConfig()` method.

  Overrides:
    init in class javax.servlet.GenericServlet
  Tags copied from class: javax.servlet.GenericServlet
  Parameters:
    `config` - the `ServletConfig` object that contains initialization parameters for this servlet
  Throws:
    javax.servlet.ServletException - if an exception occurs that interrupts the servlet's normal operation
  See Also:
    `UnavailableException`

### service

    public void service(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse res)
                 throws javax.servlet.ServletException,
                        java.io.IOException

  Description copied from class: javax.servlet.http.HttpServlet
  Receives standard HTTP requests from the public `service` method and dispatches them to the `do`xxx methods defined in this class. This method is an HTTP-specific version of the `javax.servlet.Servlet.service` method. You will probably not need to override this method.
  Overrides:
    service in class javax.servlet.http.HttpServlet
  Tags copied from class: javax.servlet.http.HttpServlet
  Parameters:
    `req` - the `HttpServletRequest` object that contains the request the client made of the servlet
    `resp` - the `HttpServletResponse` object that contains the response the servlet returns to the client
  Throws:
    java.io.IOException - if an input or output error occurs while the servlet is handling the TRACE request
    javax.servlet.ServletException - if the request for the TRACE cannot be handled
  See Also:
    `Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)`

### getServletInfo

    public java.lang.String getServletInfo()

  Description copied from class: javax.servlet.GenericServlet
  Returns a `String` that contains information about the servlet such as its author, version, and copyright information. You must override this method before it returns this information. If you do not override this method, it returns an empty string.
  Overrides:
    getServletInfo in class javax.servlet.GenericServlet
  Tags copied from class: javax.servlet.GenericServlet
  Returns:
    String a empty `String` until you override this method

### defaultDispatch

    public java.lang.Object defaultDispatch(java.lang.String method,
                                            ServletDispatch dispatch,
                                            java.lang.Object context,
                                            javax.servlet.http.HttpServletRequest req,
                                            javax.servlet.http.HttpServletResponse res)
                                     throws java.lang.Exception

  Description copied from interface: ServletDispatchHandler
  Handle an unmatched method
  Specified by:
    defaultDispatch in interface ServletDispatchHandler
  Tags copied from interface: ServletDispatchHandler
  Parameters:
    `method` - The name of the unmatched method - this will be null if there was no path left to handle
    `dispatch` - The dispatch object
    `context` -
    `req` -
    `res` -
  Returns:
    non-null if the request was handled

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