Module cloud.piranha.webapp.impl
Package cloud.piranha.webapp.impl
Class DefaultServletRequestDispatcher
java.lang.Object
cloud.piranha.webapp.impl.DefaultServletRequestDispatcher
- All Implemented Interfaces:
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
ConstructorDescriptionDefaultServletRequestDispatcher(DefaultServletInvocation servletInvocation, DefaultWebApplication webApplication)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
error(String servletName, ServletRequest servletRequest, ServletResponse servletResponse, Throwable throwable)
Send an error response.void
forward(ServletRequest servletRequest, ServletResponse servletResponse)
Dispatches using the FORWARD or ASYNC dispatch type - Forward the request and response.void
include(ServletRequest servletRequest, ServletResponse servletResponse)
Dispatches using the INCLUDE dispatch type - Include the request and response.void
request(DefaultWebApplicationRequest webappRequest, DefaultWebApplicationResponse httpResponse)
Dispatches using the REQUEST dispatch type
-
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 ServletException, IOExceptionDispatches using the REQUEST dispatch type- Parameters:
webappRequest
- the request.httpResponse
- the response.- Throws:
ServletException
- when a servlet error occurs.IOException
- when an I/O error occurs.
-
forward
public void forward(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOExceptionDispatches using the FORWARD or ASYNC dispatch type - Forward the request and response.- Specified by:
forward
in interfaceRequestDispatcher
- Parameters:
servletRequest
- the request.servletResponse
- the response.- Throws:
ServletException
- when a servlet error occurs.IOException
- when an I/O error occurs.
-
include
public void include(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOExceptionDispatches using the INCLUDE dispatch type - Include the request and response.- Specified by:
include
in interfaceRequestDispatcher
- Parameters:
servletRequest
- the request.servletResponse
- the response.- Throws:
ServletException
- when a servlet error occurs.IOException
- when an I/O error occurs.
-
error
public void error(String servletName, ServletRequest servletRequest, ServletResponse servletResponse, Throwable throwable) throws ExceptionSend 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.
-