play.server
Class ServletWrapper

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by play.server.ServletWrapper
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.servlet.Servlet, javax.servlet.ServletConfig, javax.servlet.ServletContextListener

public class ServletWrapper
extends javax.servlet.http.HttpServlet
implements javax.servlet.ServletContextListener

Servlet implementation. Thanks to Lee Breisacher.

See Also:
Serialized Form

Nested Class Summary
 class ServletWrapper.ServletInvocation
           
 
Constructor Summary
ServletWrapper()
           
 
Method Summary
 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()
           
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)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletWrapper

public ServletWrapper()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent e)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent e)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

service

protected void service(javax.servlet.http.HttpServletRequest httpServletRequest,
                       javax.servlet.http.HttpServletResponse httpServletResponse)
                throws javax.servlet.ServletException,
                       java.io.IOException
Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

serveStatic

public void serveStatic(javax.servlet.http.HttpServletResponse servletResponse,
                        javax.servlet.http.HttpServletRequest servletRequest,
                        RenderStatic renderStatic)
                 throws java.io.IOException
Throws:
java.io.IOException

isModified

public static boolean isModified(java.lang.String etag,
                                 long last,
                                 javax.servlet.http.HttpServletRequest request)

parseRequest

public static Http.Request parseRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

serve404

public void serve404(javax.servlet.http.HttpServletRequest servletRequest,
                     javax.servlet.http.HttpServletResponse servletResponse,
                     NotFound e)

serve500

public void serve500(java.lang.Exception e,
                     javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)

copyResponse

public void copyResponse(Http.Request request,
                         Http.Response response,
                         javax.servlet.http.HttpServletRequest servletRequest,
                         javax.servlet.http.HttpServletResponse servletResponse)
                  throws java.io.IOException
Throws:
java.io.IOException


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly