com.google.inject.servlet
Class InjectedHttpServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.inject.servlet.InjectedHttpServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class InjectedHttpServlet
extends javax.servlet.http.HttpServlet

Base class to be extended by all servlets that desire field and method injection to be performed during Servlet.init(javax.servlet.ServletConfig). Constructor injection is not possible. To use this you must also register your own subclass of GuiceServletContextListener as a servlet context listener.

See Also:
Serialized Form

Constructor Summary
InjectedHttpServlet()
           
 
Method Summary
 void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectedHttpServlet

public InjectedHttpServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException