Hi,
I'm using Tomcat 4.1.12 as a servlet engine. I have a Java Class which needs to be executed during startup of Tomcat. Where and how do I place this Java Class and what is the kind of entry that I need to make in the web.xml -
(if any) , so that this class would execute on startup. This class is used to cache various property values from a file.
Thanks in advance
Orjun
-
configuring Startup Class in Tomcat (3 messages)
- Posted by: orjun thengdi
- Posted on: November 18 2002 08:32 EST
Threaded Messages (3)
- configuring Startup Class in Tomcat by Web Master on November 18 2002 09:27 EST
- configuring Startup Class in Tomcat by orjun thengdi on November 18 2002 22:37 EST
- configuring Startup Class in Tomcat by Web Master on November 19 2002 08:56 EST
- configuring Startup Class in Tomcat by orjun thengdi on November 18 2002 22:37 EST
-
configuring Startup Class in Tomcat[ Go to top ]
- Posted by: Web Master
- Posted on: November 18 2002 09:27 EST
- in response to orjun thengdi
You could make it a servlet that loads on startup...
<load-on-startup>2</load-on-startup>
You could make the calls you need to make in the init() method of the servlet. -
configuring Startup Class in Tomcat[ Go to top ]
- Posted by: orjun thengdi
- Posted on: November 18 2002 22:37 EST
- in response to Web Master
Thanks,
just a question...
is <load-on-startup> a tag to be put in the web.xml file of Tomcat?
Orjun -
configuring Startup Class in Tomcat[ Go to top ]
- Posted by: Web Master
- Posted on: November 19 2002 08:56 EST
- in response to orjun thengdi
Yes it goes in web.xml which is in your WAR. Your WAR could be put anywhere that supports it...Tomcat, WebSphere, etc...