Package org.exoplatform.container.web
Class AbstractHttpServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.exoplatform.container.web.AbstractHttpServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public abstract class AbstractHttpServlet
extends jakarta.servlet.http.HttpServlet
Created by The eXo Platform SAS
Author : Nicolas Filotto
nicolas.filotto@exoplatform.com
29 sept. 2009
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.servlet.ServletConfigThe filter configurationprotected StringThe Servlet context nameFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterInit(jakarta.servlet.ServletConfig config) Allows sub-classes to initializeprotected final ExoContainerjakarta.servlet.ServletContextfinal voidinit(jakarta.servlet.ServletConfig config) protected voidonPortalEnvironmentError(jakarta.servlet.http.HttpServletRequest req, jakarta.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, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) Allow the sub classes to execute a task when the methodserviceis calledprotected booleanIndicates if it requires that a full portal environment must be setfinal voidservice(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, getServletName, init, log, log
-
Field Details
-
config
protected jakarta.servlet.ServletConfig configThe filter configuration -
servletContextName
The Servlet context name
-
-
Constructor Details
-
AbstractHttpServlet
public AbstractHttpServlet()
-
-
Method Details
-
init
public final void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletException
-
afterInit
protected void afterInit(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException Allows sub-classes to initialize- Parameters:
config- the current servlet configuration- Throws:
jakarta.servlet.ServletException
-
service
public final void service(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException - Overrides:
servicein classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException- See Also:
-
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, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException Allow the sub classes to execute a task when the methodserviceis called- Parameters:
container- the eXo containerreq- theHttpServletRequestres- theHttpServletResponse- Throws:
jakarta.servlet.ServletExceptionIOException
-
onPortalEnvironmentError
protected void onPortalEnvironmentError(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException Allow 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:
jakarta.servlet.ServletExceptionIOException
-
getContainer
- Returns:
- Gives the
ExoContainerthat fits best with the current context
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()- Specified by:
getServletContextin interfacejakarta.servlet.ServletConfig- Overrides:
getServletContextin classjakarta.servlet.GenericServlet- Returns:
- the current
ServletContext
-