Package org.apache.struts2.dispatcher.servlet

# Class StrutsServlet

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

All Implemented Interfaces:
  `jakarta.servlet.Servlet`, `jakarta.servlet.ServletConfig`, `Serializable`

public class StrutsServlet extends jakarta.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

- ## Field Summary

  ### Fields inherited from class jakarta.servlet.http.HttpServlet

  `LEGACY_DO_HEAD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StrutsServlet()`

- ## Method Summary

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

  ### Methods inherited from class jakarta.servlet.http.HttpServlet

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

  ### Methods inherited from class jakarta.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 Details

  - ### StrutsServlet

    public StrutsServlet()

- ## Method Details

  - ### init

    public void init(jakarta.servlet.ServletConfig filterConfig) throws jakarta.servlet.ServletException
    Specified by:
      `init` in interface `jakarta.servlet.Servlet`
    Overrides:
      `init` in class `jakarta.servlet.http.HttpServlet`
    Throws:
      `jakarta.servlet.ServletException`

  - ### service

    public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
    Overrides:
      `service` in class `jakarta.servlet.http.HttpServlet`
    Throws:
      `IOException`
      `jakarta.servlet.ServletException`

  - ### destroy

    public void destroy()
    Specified by:
      `destroy` in interface `jakarta.servlet.Servlet`
    Overrides:
      `destroy` in class `jakarta.servlet.GenericServlet`