Class DefaultServletRequestDispatcher

java.lang.Object
cloud.piranha.core.impl.DefaultServletRequestDispatcher
All Implemented Interfaces:
jakarta.servlet.RequestDispatcher

public class DefaultServletRequestDispatcher extends Object implements jakarta.servlet.RequestDispatcher
The default ServletRequestDispatcher.
Author:
Manfred Riem ([email protected])
  • Field Summary

    Fields inherited from interface jakarta.servlet.RequestDispatcher

    ERROR_EXCEPTION, ERROR_EXCEPTION_TYPE, ERROR_MESSAGE, ERROR_REQUEST_URI, ERROR_SERVLET_NAME, ERROR_STATUS_CODE, FORWARD_CONTEXT_PATH, FORWARD_MAPPING, FORWARD_PATH_INFO, FORWARD_QUERY_STRING, FORWARD_REQUEST_URI, FORWARD_SERVLET_PATH, INCLUDE_CONTEXT_PATH, INCLUDE_MAPPING, INCLUDE_PATH_INFO, INCLUDE_QUERY_STRING, INCLUDE_REQUEST_URI, INCLUDE_SERVLET_PATH
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    error(String servletName, jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, Throwable throwable)
    Send an error response.
    void
    forward(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)
    Dispatches using the FORWARD or ASYNC dispatch type - Forward the request and response.
    void
    include(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)
    Dispatches using the INCLUDE dispatch type - Include the request and response.
    void
    Dispatches using the REQUEST dispatch type

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultServletRequestDispatcher

      public DefaultServletRequestDispatcher(DefaultServletInvocation servletInvocation, DefaultWebApplication webApplication)
      Constructor.
      Parameters:
      servletInvocation - The servlet invocation containing all info this dispatcher uses to dispatch to the contained Servlet.
      webApplication - the web application.
  • Method Details

    • request

      public void request(DefaultWebApplicationRequest webappRequest, DefaultWebApplicationResponse httpResponse) throws jakarta.servlet.ServletException, IOException
      Dispatches using the REQUEST dispatch type
      Parameters:
      webappRequest - the request.
      httpResponse - the response.
      Throws:
      jakarta.servlet.ServletException - when a servlet error occurs.
      IOException - when an I/O error occurs.
    • forward

      public void forward(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) throws jakarta.servlet.ServletException, IOException
      Dispatches using the FORWARD or ASYNC dispatch type - Forward the request and response.
      Specified by:
      forward in interface jakarta.servlet.RequestDispatcher
      Parameters:
      servletRequest - the request.
      servletResponse - the response.
      Throws:
      jakarta.servlet.ServletException - when a servlet error occurs.
      IOException - when an I/O error occurs.
    • include

      public void include(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) throws jakarta.servlet.ServletException, IOException
      Dispatches using the INCLUDE dispatch type - Include the request and response.
      Specified by:
      include in interface jakarta.servlet.RequestDispatcher
      Parameters:
      servletRequest - the request.
      servletResponse - the response.
      Throws:
      jakarta.servlet.ServletException - when a servlet error occurs.
      IOException - when an I/O error occurs.
    • error

      public void error(String servletName, jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, Throwable throwable) throws Exception
      Send an error response.
      Parameters:
      servletName - the servlet name.
      servletRequest - the servlet request.
      servletResponse - the servlet response.
      throwable - the throwable.
      Throws:
      Exception - when a serious error occurs.