File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "WAR file" Watch "WAR file" New topic

WAR file

vivi santa

Joined: Feb 02, 2001
Posts: 26
Can anyone tell me how to make a WAR file?
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
use jar.exe as
jar cfv test.war *.jsp
Younas Aamir
Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
There is no difference between a jar file and a war file. It is just the extension but the utility (jar) does the same functionality of zipping the given files.
The only difference being that only servlets and jsp pages are jar'red with a war extension.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
There are some requirements, though:
there should be a directory called WEB-INF (capitals!!!) containing a file called web.xml (this is your deployment descriptor for servlets, etc).
loose Java classes should go into WEB-INF/classes
jarfiles go into WEB-INF/lib

hemang patel

Joined: Mar 06, 2001
Posts: 8
I was never good at remembering dos-prompt commands. If you have J2EE Enterprise Edition, then its deployment tool will make a war file ... its a GUI, which allows you to choose files to be included in the WAR archive
faisal mahmood
Ranch Hand

Joined: Nov 30, 2000
Posts: 349
I don't think any GUI tools comes with jdk1.3 for creating jar or war files but some IDE's such as JBuilder 4 or Forte may do that.
I agree. Here's the link:
subject: WAR file
It's not a secret anymore!