File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to create a war file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to create a war file " Watch "How to create a war file " New topic
Author

How to create a war file

Glenny Dsilva
Ranch Hand

Joined: May 09, 2005
Posts: 42
1. What are the commands to create a war file in tomcat.

2. How to deploy the war file in tomcat 5.0
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

1.)
Tomcat doesn't create the war file, the jar utility does.

If you were on a Unix box and you wanted to war up an app named myApp and put it in your home directory:


Likewise, if you were on a windows box and wanted to create the war file in your C: drives root directory:



2.)
The easiest way to deploy a war file in Tomcat is to put it in the TOMCAT_HOME/webapps directory.
[ May 09, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Glenny Dsilva
Ranch Hand

Joined: May 09, 2005
Posts: 42
Thanx a lot

But How do I then extract the war file.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you put it in the webapps directory, Tomcat will extract it for you.
You can try this with any of the demo war files from my site if you like
http://simple.souther.us

You can also extract them with the jar utility:


WinZip can also open/extact them.
They're just jar files.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a war file