org.apache.struts2.dispatcher.servlet

## Class StrutsServlet

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - org.apache.struts2.dispatcher.servlet.StrutsServlet

- All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

      public class StrutsServlet
      extends javax.servlet.http.HttpServlet

  Servlet dispatcher for Struts. The preferred way to use Struts is as a filter via the `StrutsPrepareAndExecuteFilter` and its variants. This servlet dispatcher is only for those that really know what they are doing as it may not support every feature of Struts, particularly static resource serving.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrutsServlet()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()`
    `void` | `init(javax.servlet.ServletConfig filterConfig)`
    `void` | `service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StrutsServlet

          public StrutsServlet()

  - ### Method Detail

    - #### init

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

      Specified by:
        `init` in interface `javax.servlet.Servlet`
      Overrides:
        `init` in class `javax.servlet.GenericServlet`
      Throws:
        `javax.servlet.ServletException`

    - #### service

          public void service(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
                       throws IOException,
                              javax.servlet.ServletException

      Overrides:
        `service` in class `javax.servlet.http.HttpServlet`
      Throws:
        `IOException`
        `javax.servlet.ServletException`

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `javax.servlet.Servlet`
      Overrides:
        `destroy` in class `javax.servlet.GenericServlet`

Copyright © 2000–2019 Apache Software Foundation. All rights reserved.