ch.elca.el4j.web.context
Class ModuleContextLoaderServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by ch.elca.el4j.web.context.ModuleContextLoaderServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ModuleContextLoaderServlet
extends javax.servlet.http.HttpServlet

Bootstrap servlet to start up the WebApplicationContext. Simply delegates to ModuleContextLoader. Note that this class has been deprecated for containers implementing Servlet API 2.4 or higher in favour of ModuleContextLoaderListener.

Author:
Stefan Wismer (SWI), Jonas Hauenstein (JHN)
See Also:
Serialized Form
File-location:
ModuleContextLoaderServlet
Last check-in date:
2010-01-15 12:21:07 +0100 (Fr, 15. Jan 2010) by jonasha for revision 4091

Constructor Summary
ModuleContextLoaderServlet()
           
 
Method Summary
protected  ContextLoader createContextLoader()
          Create the ContextLoader to use.
 void destroy()
          Close the root web application context.
 ContextLoader getContextLoader()
          Return the ContextLoader used by this servlet.
 String getServletInfo()
          
 void init()
          Initialize the root web application context.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This should never even be called since no mapping to this servlet should ever be created in web.xml.
 
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, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleContextLoaderServlet

public ModuleContextLoaderServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Initialize the root web application context.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

createContextLoader

protected ContextLoader createContextLoader()
Create the ContextLoader to use. Can be overridden in subclasses. Creates the ModuleContextLoader as default.

Returns:
the new ContextLoader

getContextLoader

public ContextLoader getContextLoader()
Return the ContextLoader used by this servlet.

Returns:
the current ContextLoader

destroy

public void destroy()
Close the root web application context.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws IOException
This should never even be called since no mapping to this servlet should ever be created in web.xml. That's why a correctly invoked Servlet 2.3 listener is much more appropriate for initialization work ;-)

Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
IOException

getServletInfo

public String getServletInfo()

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet


Copyright © 2005-2011 ELCA. All Rights Reserved.