JSF-Spring

de.mindmatters.faces.spring.context
Class ContextLoaderServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by de.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 Spring's root WebApplicationContext. Simply delegates to ContextLoader.

For further informtion please have a look at the documentation of ContextLoaderServlet.

Author:
Andreas Kuhrwahl
See Also:
Serialized Form

Constructor Summary
ContextLoaderServlet()
           
 
Method Summary
protected  ContextLoader createContextLoader()
          Creates the ConfigLoader to use.
 void destroy()
          Closes the jsf-spring-config root web application context.
 java.lang.String getServletInfo()
          
 void init()
          Initializes the jsf-spring-config 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 ConfigLoader to use. Can be overridden in subclasses.

Returns:
the new ConfigLoader

init

public final void init()
                throws javax.servlet.ServletException
Initializes the jsf-spring-config root web application context.

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

destroy

public final void destroy()
Closes the jsf-spring-config root web application context.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet
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 ;-)

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

getServletInfo

public final java.lang.String getServletInfo()

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

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG