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 query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark ".war query" Watch ".war query" New topic

.war query

Himanshu Bisht
Ranch Hand

Joined: Aug 27, 2004
Posts: 96
I made a web application and made a war file.
Now when it put my war file in the webapps directory and starts tomcat it unzips the war file and the whole application directorys are created.

I just wanted to know that is this normal war action or something wrong with my application as i find no use making a war if all the directoried are made again once i run the server.

Anybody can explain???
Chandra Sekhar
Ranch Hand

Joined: Sep 26, 2003
Posts: 90

This is the normal behaviour..

With WAR files you can package all the resources of a Web application into a single(.war) file, which can be deployed to most standard Web application servers, including Tomcat.So deployement becomes easy


"Luck is when opportunity meets preparation"
Himanshu Bisht
Ranch Hand

Joined: Aug 27, 2004
Posts: 96
ya thats very true but i was checking the tomcat webapps directory where i found that the war file has been unzipped and the files which i used to make war are again there.

What my query is that is this the normal behaviour of war file that it unzips itself after one deploys it in the server???

Richard Bradford
Ranch Hand

Joined: Apr 20, 2004
Posts: 48
Yes. This is normal behaviour.
Merlin Thomas

Joined: Jul 15, 2011
Posts: 6
What i think is that, its the web container which unzips the war file, otherwise war files are not extracted normally.

I agree. Here's the link:
subject: .war query
It's not a secret anymore!