public class RequestFactoryServlet
extends javax.servlet.http.HttpServlet
Constructor and Description |
---|
RequestFactoryServlet()
Constructs a new
RequestFactoryServlet with a
DefaultExceptionHandler . |
RequestFactoryServlet(ExceptionHandler exceptionHandler,
ServiceLayerDecorator... serviceDecorators)
Use this constructor in subclasses to provide a custom
ExceptionHandler . |
Modifier and Type | Method and Description |
---|---|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Processes a POST to the server.
|
static javax.servlet.http.HttpServletRequest |
getThreadLocalRequest()
Returns the thread-local
HttpServletRequest . |
static javax.servlet.http.HttpServletResponse |
getThreadLocalResponse()
Returns the thread-local
HttpServletResponse . |
static javax.servlet.ServletContext |
getThreadLocalServletContext()
Returns the thread-local
ServletContext |
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public RequestFactoryServlet()
RequestFactoryServlet
with a
DefaultExceptionHandler
.public RequestFactoryServlet(ExceptionHandler exceptionHandler, ServiceLayerDecorator... serviceDecorators)
ExceptionHandler
.exceptionHandler
- an ExceptionHandler
instanceserviceDecorators
- an array of ServiceLayerDecorators that change how
the RequestFactory request processor interact with the domain
objectspublic static javax.servlet.http.HttpServletRequest getThreadLocalRequest()
HttpServletRequest
.HttpServletRequest
instancepublic static javax.servlet.http.HttpServletResponse getThreadLocalResponse()
HttpServletResponse
.HttpServletResponse
instancepublic static javax.servlet.ServletContext getThreadLocalServletContext()
ServletContext
ServletContext
associated with this servletprotected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
doPost
in class javax.servlet.http.HttpServlet
request
- an HttpServletRequest
instanceresponse
- an HttpServletResponse
instanceIOException
- if an internal I/O error occursjavax.servlet.ServletException
- if an error occurs in the servletCopyright © 2016. All rights reserved.