Package org.exoplatform.container.web
Class AbstractHttpServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.exoplatform.container.web.AbstractHttpServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public abstract class AbstractHttpServlet extends javax.servlet.http.HttpServletCreated by The eXo Platform SAS Author : Nicolas Filotto nicolas.filotto@exoplatform.com 29 sept. 2009- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.ServletConfigconfigThe filter configurationprotected StringservletContextNameThe Servlet context name
-
Constructor Summary
Constructors Constructor Description AbstractHttpServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterInit(javax.servlet.ServletConfig config)Allows sub-classes to initializeprotected ExoContainergetContainer()javax.servlet.ServletContextgetServletContext()voidinit(javax.servlet.ServletConfig config)protected voidonPortalEnvironmentError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)Allow the sub classed to execute a task when the portal environment could not be set because no related portal container could be foundprotected voidonService(ExoContainer container, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)Allow the sub classes to execute a task when the methodserviceis calledprotected booleanrequirePortalEnvironment()Indicates if it requires that a full portal environment must be setvoidservice(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
config
protected javax.servlet.ServletConfig config
The filter configuration
-
servletContextName
protected String servletContextName
The Servlet context name
-
-
Method Detail
-
init
public final void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
afterInit
protected void afterInit(javax.servlet.ServletConfig config) throws javax.servlet.ServletExceptionAllows sub-classes to initialize- Parameters:
config- the current servlet configuration- Throws:
javax.servlet.ServletException
-
service
public final void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException- Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException- See Also:
HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-
requirePortalEnvironment
protected boolean requirePortalEnvironment()
Indicates if it requires that a full portal environment must be set- Returns:
trueif it requires the portal environmentfalseotherwise.
-
onService
protected void onService(ExoContainer container, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
Allow the sub classes to execute a task when the methodserviceis called- Parameters:
container- the eXo containerreq- theHttpServletRequestres- theHttpServletResponse- Throws:
javax.servlet.ServletExceptionIOException
-
onPortalEnvironmentError
protected void onPortalEnvironmentError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOExceptionAllow the sub classed to execute a task when the portal environment could not be set because no related portal container could be found- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
javax.servlet.ServletExceptionIOException
-
getContainer
protected final ExoContainer getContainer()
- Returns:
- Gives the
ExoContainerthat fits best with the current context
-
getServletContext
public javax.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfacejavax.servlet.ServletConfig- Overrides:
getServletContextin classjavax.servlet.GenericServlet- Returns:
- the current
ServletContext
-
-