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
You could make it a servlet that loads on startup...
You could make the calls you need to make in the init() method of the servlet.
just a question...
is <load-on-startup> a tag to be put in the web.xml file of Tomcat?
Yes it goes in web.xml which is in your WAR. Your WAR could be put anywhere that supports it...Tomcat, WebSphere, etc...