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