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.HttpServlet
Created by The eXo Platform SAS Author : Nicolas Filotto nicolas.filotto@exoplatform.com 29 sept. 2009
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected javax.servlet.ServletConfig
    The filter configuration
    protected String
    The Servlet context name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    afterInit(javax.servlet.ServletConfig config)
    Allows sub-classes to initialize
    protected final ExoContainer
     
    javax.servlet.ServletContext
     
    final void
    init(javax.servlet.ServletConfig config)
    protected void
    onPortalEnvironmentError(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 found
    protected void
    onService(ExoContainer container, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
    Allow the sub classes to execute a task when the method service is called
    protected boolean
    Indicates if it requires that a full portal environment must be set
    final void
    service(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

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • config

      protected javax.servlet.ServletConfig config
      The filter configuration
    • servletContextName

      protected String servletContextName
      The Servlet context name
  • Constructor Details

    • AbstractHttpServlet

      public AbstractHttpServlet()
  • Method Details

    • init

      public final 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
    • afterInit

      protected void afterInit(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
      Allows 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:
      service in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
      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:
      true if it requires the portal environment false otherwise.
    • 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 method service is called
      Parameters:
      container - the eXo container
      req - the HttpServletRequest
      res - the HttpServletResponse
      Throws:
      javax.servlet.ServletException
      IOException
    • onPortalEnvironmentError

      protected void onPortalEnvironmentError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.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 - the HttpServletRequest
      res - the HttpServletResponse
      Throws:
      javax.servlet.ServletException
      IOException
    • getContainer

      protected final ExoContainer getContainer()
      Returns:
      Gives the ExoContainer that fits best with the current context
    • getServletContext

      public javax.servlet.ServletContext getServletContext()
      Specified by:
      getServletContext in interface javax.servlet.ServletConfig
      Overrides:
      getServletContext in class javax.servlet.GenericServlet
      Returns:
      the current ServletContext