This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 9351
    
    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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can i start or run a part of code when we first deploy a WAR file?