Thanks Larry, Thanks Larry. I created a Context Listener and it worked great. However I have a question. I experimented with putting my initialization stuff in a servlet with a load-on-startup element of 0. This seems to work as well. All initialization was done when the servlet loaded. So if both methods of initialization work, which one is recommended and why?
Thanks again, Subir -----Original Message----- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 5:15 AM To: 'Tomcat Users List' Subject: RE: Initialization in Tomcat 4.0.3 In Tomcat 4.x, this is accomplished by adding a LifecycleListener to the appropriate container, Engine, Host, etc. An example of how something like this is done may be found at: <http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/host.html#User%20Web %20Applications> In this case, the Listener is added to the Host container. It adds user home directories as contexts when the Lifecyle.START_EVENT occurs. See the org.apache.catalina.startup.UserConfig source for implementation details. Hopefully, this will get you started. Cheers, Larry > -----Original Message----- > From: Subir Sengupta [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 15, 2002 6:08 PM > To: '[EMAIL PROTECTED]' > Subject: Initialization in Tomcat 4.0.3 > > > Hi, > > In Tomcat 3 we initialized stuff with the RequestInterceptor > element in > web.xml like this: > > <RequestInterceptor > debug="0" > className="org.apache.tomcat.init.Init" /> > > Init has a engineInit method that looks like this: > public final class Init extends BaseInterceptor > . > . > . > public void engineInit(ContextManager cm) throws TomcatException { > CategoryNames.init(); > > etc > > How do I the same thing in Tomcat 4.0.3 ? > > Thanks from a Tomcat newbie, > Subir > > > > > > > <<Subir Sengupta (E-mail).vcf>> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>