public class ServletWrapper
extends javax.servlet.http.HttpServlet
implements javax.servlet.ServletContextListener
Modifier and Type | Class and Description |
---|---|
class |
ServletWrapper.ServletInvocation |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IF_MODIFIED_SINCE |
static java.lang.String |
IF_NONE_MATCH |
static java.lang.String |
SERVLET_REQ
Constant for accessing the underlying HttpServletRequest from Play's Request
in a Servlet based deployment.
|
static java.lang.String |
SERVLET_RES
Constant for accessing the underlying HttpServletResponse from Play's Request
in a Servlet based deployment.
|
Constructor and Description |
---|
ServletWrapper() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent e) |
void |
contextInitialized(javax.servlet.ServletContextEvent e) |
void |
copyResponse(Http.Request request,
Http.Response response,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse) |
void |
destroy() |
protected static java.util.Map<java.lang.String,Http.Cookie> |
getCookies(javax.servlet.http.HttpServletRequest httpServletRequest) |
protected static java.util.Map<java.lang.String,Http.Header> |
getHeaders(javax.servlet.http.HttpServletRequest httpServletRequest) |
static boolean |
isGreaterThan(javax.servlet.ServletContext context,
int majorVersion,
int minorVersion) |
static boolean |
isModified(java.lang.String etag,
long last,
javax.servlet.http.HttpServletRequest request) |
static Http.Request |
parseRequest(javax.servlet.http.HttpServletRequest httpServletRequest) |
void |
serve404(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
NotFound e) |
void |
serve500(java.lang.Exception e,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
serveStatic(javax.servlet.http.HttpServletResponse servletResponse,
javax.servlet.http.HttpServletRequest servletRequest,
RenderStatic renderStatic) |
protected void |
service(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public static final java.lang.String IF_MODIFIED_SINCE
public static final java.lang.String IF_NONE_MATCH
public static final java.lang.String SERVLET_REQ
Sample usage:
HttpServletRequest req = Request.current().args.get(ServletWrapper.SERVLET_REQ);
public static final java.lang.String SERVLET_RES
Sample usage:
HttpServletResponse res = Request.current().args.get(ServletWrapper.SERVLET_RES);
public void contextInitialized(javax.servlet.ServletContextEvent e)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent e)
contextDestroyed
in interface javax.servlet.ServletContextListener
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public static boolean isGreaterThan(javax.servlet.ServletContext context, int majorVersion, int minorVersion)
protected void service(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void serveStatic(javax.servlet.http.HttpServletResponse servletResponse, javax.servlet.http.HttpServletRequest servletRequest, RenderStatic renderStatic) throws java.io.IOException
java.io.IOException
public static boolean isModified(java.lang.String etag, long last, javax.servlet.http.HttpServletRequest request)
public static Http.Request parseRequest(javax.servlet.http.HttpServletRequest httpServletRequest) throws java.lang.Exception
java.lang.Exception
protected static java.util.Map<java.lang.String,Http.Header> getHeaders(javax.servlet.http.HttpServletRequest httpServletRequest)
protected static java.util.Map<java.lang.String,Http.Cookie> getCookies(javax.servlet.http.HttpServletRequest httpServletRequest)
public void serve404(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, NotFound e)
public void serve500(java.lang.Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public void copyResponse(Http.Request request, Http.Response response, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws java.io.IOException
java.io.IOException
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly