This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Can i start or run a  part of code when we first deploy a WAR file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

Can i start or run a part of code when we first deploy a WAR file?

ayyappa karamsetty
Greenhorn

Joined: Feb 26, 2011
Posts: 4
Hey folks,

Is there any method or API that i can use so that when ever i deploy a new WAR file, a part of code should execute or perhaps when tomcat starts, the respective servlet should start or run a code continuously.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Have a look here:

http://www.coderanch.com/t/530997/Tomcat/Starting-Servlet-automaticaally-when-tomcat


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Can i start or run a part of code when we first deploy a WAR file?
 
Similar Threads
Steps to deploy hibernate in EJB container
Servlet in welcome file list Error
Need the procedure for creating and deploying EAR,WAR files in JBoss3.2.5 Server
JForum in Websphere 6 express installation problem.
Ant reload task works, but...