This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Start up class in tomcat

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a JAVA class ..not a servlet ...and I want to mak up this class as a start up class in Tomcat5.0.19.

How do I do that
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand your question to be: how to create an instance of a Java class when Tomcat is started.
Tomcat will automatically create instances of servlets that are marked with a web.xml entry like:

see the entry for the default servlet in conf/web.xml for an example.
You can have then have the servlet init method create an instance of the class.
If that is not what you mean, please explain what this class is for.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic