Home > Ask the SOA Experts > Questions & Answers > What is a WAR file?
Ask The SOA Expert: Questions & Answers
EMAIL THIS

What is a WAR file?

Jeff  Hanson EXPERT RESPONSE FROM: Jeff Hanson

Pose a Question
Other SOA Categories
Meet all SOA Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 23 September 2002
What is a WAR file? How can I use this efficiently in my Web applications, as I am using JSP, EJB, XML?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Java Web Services
How do I balance throughput requirements and interoperability?
IBM ILOG rules engines update supports Java, .NET
APM software traces transactions across tiers, technologies
Red Hat improves JBoss Java enterprise rules management
Open source tools fill in app lifecycle gaps for SpringSource
Java side of Sun seen strengthened by Oracle buy
Sun previews GlassFish V3 ahead of Java EE6 release
COBOL apps moving to SOA: Rip-and-replace meets the recession
On lightweight Java frameworks and service-oriented architecture
Learn about Ruby on Rails programming

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
EmbeddedJava  (SearchSOA.com)
Java Card  (SearchSOA.com)
Java Development Kit  (SearchSOA.com)
Java Runtime Environment  (SearchSOA.com)
Java virtual machine  (SearchSOA.com)
JMX  (SearchSOA.com)
MBean  (SearchSOA.com)
Project Metro  (SearchSOA.com)
Project Tango  (SearchSOA.com)
Tomcat  (SearchSOA.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


A J2EE application is a group of Web modules that collectively perform as a single entity. A Web Module is an entity consisting of one or more resources such as HTML files, Java class files, JSP files, XML files, etc. Web Modules are packaged in Web Archive (WAR) files. An EAR (Enterprise Archive) file is a JAR file encapsulating a J2EE application. In other words, EAR files contain EJB JAR files, WAR files, application resources, etc.

A Web application has a WEB-INF/lib directory in which utility classes, resource files and JAR files can be placed in order to be accessed by servlets and other classes running in the context of a servlet. The extension mechanism for JDK 1.3 allows .jar files to declare dependencies upon other .jar files using a "Class-Path:" attribute in the manifest file. The Class-Path: attribute consists of a list of relative URLs that will be searched by the application server's classloader in order to find utility classes and .jar files. This is an important improvement, since it allows multiple EJBs to reference one set of utility classes.

Using a combination of the WEB-INF/lib directory and the Class-Path: attribute, you can intelligently distribute your application files by:
1) Placing classes that are shared by more than one Web application in a common .jar file and adding a reference to the .jar file in the Class-Path: list of the application's manifest file.
2) Adding references to EJB support libraries in the proper manifest Class-Path: list.
3) Placing utility .jar files for a Web application in the application's WEB-INF/lib directory.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SOA Governance White Papers - BPM, EDA, IT Governance
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2001 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts