SourceForge.net Logo

de.mindmatters.faces.spring.context
Class ContextLoaderServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byde.mindmatters.faces.spring.context.ContextLoaderServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ContextLoaderServlet
extends javax.servlet.http.HttpServlet

Bootstrap servlet to start up faces' root WebApplicationContext. Simply delegates to ContextLoader.

This servlet should have a lower load-on-startup value in web.xml than any servlets that access the faces root web application context.

This servlet must have a lower load-on-startup value in web.xml than the FacesServlet.

Note that this class has been deprecated for containers implementing Servlet API 2.4 or higher, in favor of ContextLoaderListener.
For further information see ContextLoaderServlet.

Author:
Andreas Kuhrwahl
See Also:
ContextLoader, ContextLoaderListener, Serialized Form

Constructor Summary
ContextLoaderServlet()
           
 
Method Summary
protected  ContextLoader createContextLoader()
          Creates the ContextLoader to use.
 void destroy()
          Closes the faces root web application context.
 java.lang.String getServletInfo()
          
 void init()
          Initializes the faces 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

ContextLoaderServlet

public ContextLoaderServlet()
Method Detail

createContextLoader

protected ContextLoader createContextLoader()
Creates the ContextLoader to use. Can be overridden in subclasses.

Returns:
the new ContextLoader

init

public final void init()
                throws javax.servlet.ServletException
Initializes the faces root web application context.

Throws:
javax.servlet.ServletException - in cases of errors
See Also:
GenericServlet.init()

destroy

public final void destroy()
Closes the faces root web application context.

See Also:
Servlet.destroy()

service

public final void service(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.io.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 ;-)

Parameters:
request - the request
response - the response
Throws:
java.io.IOException - in cases of i/o errors
See Also:
#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

getServletInfo

public final java.lang.String getServletInfo()


SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG