com.arsdigita.web
Class ContextRegistrationServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.arsdigita.web.ContextRegistrationServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ContextRegistrationServlet
extends javax.servlet.http.HttpServlet

Every application running in its own webapp should declare an instance of this servlet in their web.xml, marking it to load on startup. This is a work around for bz 114688 - Tomcat ServletContext#getContext(String) always returns the ROOT context in releases < 4.1.20 Map into your web.xml as follows:

 <servlet>
   <servlet-name>reg</servlet-name>
   <servlet-class>com.arsdigita.web.ContextRegistrationServlet</servlet-class>
   <init-param>
     <param-name>uri</param-name>
     <param-value>/ccm-ldn-theme/</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

 <servlet-mapping>
   <servlet-name>reg</servlet-name>
   <url-pattern>/__ccm__/null/reg/*</url-pattern>
 </servlet-mapping>

The value of the init-param should be the same as the

See Also:
Serialized Form

Constructor Summary
ContextRegistrationServlet()
           
 
Method Summary
 void destroy()
           
 void init(javax.servlet.ServletConfig sconfig)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextRegistrationServlet

public ContextRegistrationServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig sconfig)
          throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

destroy

public void destroy()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC