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

content in war file

Arun Prasath
Ranch Hand

Joined: Jul 18, 2006
Posts: 60
what must be present in the content of WAR file and what are optional?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63837

This is the sort of thing that is best looked up in the Spec.

A link to the Servlet Specification can be found in the JSP FAQ.

[Asking smart questions] [About Bear] [Books by Bear]
Janakiram Gattupalli

Joined: Jul 30, 2006
Posts: 8
Hi Arun,
we can deploy our web-application in two ways.
1.exploded directory structure
2.war(web archieve) file

WARFILE is better than expolded directory structure. we can easily export and import WARFILE .
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
war file when put in the server...once it gets expanded will be same as the

option 1 (exploded directory structure) in Janakiram's answer...

the contents...same as what you would put in the above option.

Extra stuff would be the meta-inf directory and file...

Contents would be html,jsps,images,css,jars,classes,tlds,tags,web.xml,config files,etc..(what a normal web application has)
Amar Deep Singh Chaudhary
Ranch Hand

Joined: Dec 26, 2006
Posts: 49
hi Arun !
In the war file we placed the all contents which we want to access through the browser including html files,jsp files images classes and packege and the web.xml file in the deployment directory structure.

"a mind thought never dies."

"A thinking mind never dies"
I agree. Here's the link:
subject: content in war file
jQuery in Action, 3rd edition