shell script 101: http://www.go2linux.org/st
Main Topics
Browse All TopicsHi: I have a web applications which generate war. Everytime, when I make deployment, I have to stop tomcat. I have to delete old war files and make directory, and copy new war to the newly created directory. After all this I have to restart tomcat. Yes, it is so simple. But due to lack of script knowledge, I do not know which script language I shall use to implement a script to fulfill this tedious task. Any suggestions and study material? I have background to write .bat file in windowns command window.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
shell script 101: http://www.go2linux.org/st
First, it's Ubuntu. Which means the start/stop scripts always exist.
Do: sudo /etc/init.d/tomcat* start
(I don't know which version of tomcat, so don't know the exact name of the tomcat script)
Now, since it's Ubuntu, you also have the tomcat*-admin package. Install that, and you can install new .wars from the web interface.
Finally, you _can_ set a tomcat option to make tomcat automatically reload wars when they're added, in which case you won't need to restart tomcat at all. Look for your "server.xml" file (I don't currently have an Ubuntu tomcat, so I'm not certain where you'll find it, but /etc/tomcat5/server.xml is where it is on my CentOS system). Look for "autodeploy". autoDeploy="true" will make it automatically reload war files whenever they're dropped in the webapps folder. You want to be pretty sure of the security of that folder before you enable that option,
Business Accounts
Answer for Membership
by: objectsPosted on 2009-03-24 at 01:48:51ID: 23965683
a shell script will do the trick
basically just put the commands you need execuuted in your script