Package com.rosivanyshyn.controller.dispatcher

# Class DispatcherServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.rosivanyshyn.controller.dispatcher.DispatcherServlet

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

@WebServlet(name="DispatcherServlet", value="/front") public class DispatcherServlet extends jakarta.servlet.http.HttpServlet
Dispatcher Servlet class. Implements Front-controller pattern.
Dispatcher operates request and response depends on specific controller `ViewResolver` realisation

See Also:
  - Serialized Form

- ## Field Summary

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

  `LEGACY_DO_HEAD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DispatcherServlet()`
  Default constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
  Handles request and response in processRequest method
  `protected void`
  `doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
  Handles request and response in processRequest method

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

  `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, service`

  ### Methods inherited from class jakarta.servlet.GenericServlet

  `destroy, 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

  - ### DispatcherServlet

    public DispatcherServlet()
    Default constructor

- ## Method Details

  - ### doGet

    protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
    Handles request and response in processRequest method
    Overrides:
      `doGet` in class `jakarta.servlet.http.HttpServlet`
    Parameters:
      `request` - user request
      `response` - response to user
    Throws:
      `jakarta.servlet.ServletException`
      `IOException`

  - ### doPost

    protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
    Handles request and response in processRequest method
    Overrides:
      `doPost` in class `jakarta.servlet.http.HttpServlet`
    Parameters:
      `request` - user request
      `response` - response to user
    Throws:
      `jakarta.servlet.ServletException`
      `IOException`