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, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
public 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 ServletContextListener
public void contextDestroyed(ServletContextEvent e)
contextDestroyed
in interface ServletContextListener
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
public static boolean isGreaterThan(ServletContext context, int majorVersion, int minorVersion)
protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException
service
in class HttpServlet
ServletException
IOException
public void serveStatic(HttpServletResponse servletResponse, HttpServletRequest servletRequest, RenderStatic renderStatic) throws IOException
IOException
public static boolean isModified(String etag, String lastDate, HttpServletRequest request)
public static Http.Request parseRequest(HttpServletRequest httpServletRequest) throws Exception
Exception
protected 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
IOException
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly