File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Help for prepare scripts... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help for prepare scripts..." Watch "Help for prepare scripts..." New topic
Author

Help for prepare scripts...

Rizvan Asgarov
Ranch Hand

Joined: Jan 07, 2009
Posts: 450

Hi Dear Friends,

Please help for the following problem:
(my purpose is to simplify the deployment with apache-ant)

1. Stop Tomcat 6.x
2. a) Create a new war_backup folder in any disk and create a new 01.07.2009 (must be change every day) folder in war_backup folder (as G:/war_backup/01.07.2009)
b) Further copy rizvan.war (Tomcat user -> apache-tomcat/webapps/rizvan.war) to this new 01.07.2009 folder.
3. Also copy logs folder (apache-tomcat/logs) to this new 01.07.2009 folder.
4. Then delete old rizavn.war (apache-tomcat/webapps/rizvan.war) and rizvan folder (apache-tomcat/webapps/rizvan)
5. Also delete files in old logs folder (apache-tomcat/logs)
6. Also delete files in work folder (apache-tomcat/work)
7. Then copy new rizvan.war from the disk (G:/) to the apache-tomcat/webapps/
8. And at last start Tomcat

Thanks in advance,
Rizvan

"Half of the science is to ask question"
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Most of your task could be done with ANT Core Tasks http://ant.apache.org/manual/index.html , but in general I do not understand why do you want to back up war file or why do you need copy log files to some other location. Most likely to simplify the deployment you have to script the following
1) get source code from version control system
2) build a new war file
3) deploy war file to tomcat
Rizvan Asgarov
Ranch Hand

Joined: Jan 07, 2009
Posts: 450

Hi All,
Thanks Misha for your helpful reply...
Misha Ver wrote:
but in general I do not understand why do you want to back up war file or ...

Some organizations use our programs. And some problems occur in them. Therefore we solve these problems in the rule shown above. So i need a script for simplify the deployment work... !?

Sincerely,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help for prepare scripts...
 
Similar Threads
compiling and deploying into Tomcat
creating website basic question
How to create a multiple tomcat instances in windows?
Error while installing Tomcat 5
HTTP Status 404 error in tomcat