Interface HttpRequestHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
ServletException
and IOException, to allow for usage within any
HttpServlet. This interface is essentially the
direct equivalent of an HttpServlet, reduced to a central handle method.
The easiest way to expose an HttpRequestHandler bean in Spring style
is to define it in Spring's root web application context and define
an HttpRequestHandlerServlet
in web.xml, pointing to the target HttpRequestHandler bean
through its servlet-name which needs to match the target bean name.
Supported as a handler type within Spring's
invalid reference
org.springframework.web.servlet.DispatcherServlet
Typically implemented to generate binary responses directly,
with no separate view resource involved. This differentiates it from a
invalid reference
org.springframework.web.servlet.mvc.Controllerinvalid reference
org.springframework.web.servlet.ModelAndView
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Process the given request, generating a response.
-
Method Details
-
handleRequest
void handleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException Process the given request, generating a response.- Parameters:
request- current HTTP requestresponse- current HTTP response- Throws:
jakarta.servlet.ServletException- in case of general errorsIOException- in case of I/O errors
-