Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

J2ee - Difference between war and ear Application

Posted on 2014-03-10
1
Medium Priority
?
659 Views
Last Modified: 2014-03-13
Hi All,
I have been working on core java for some time. I am now moving into J2ee web programming.

Can someone list differences between ear and war files produced for java app.

I am looking for a in depth detailed explanation  and not just couple of lines.

Thanks
0
Comment
Question by:crazywolf2010
1 Comment
 
LVL 16

Accepted Solution

by:
Valeri earned 2000 total points
ID: 39917276
taken from internet, but very good explanation:

WAR - Web ARchive

As the name suggests this file format is used to package all the components of a Web Application. It may contain JARs, JSPs, Servlets, HTMLs, GIFs, etc. The purpose of this archive format is same as that of the JAR - to make the deployment, shipping, and in turn the maintenance process easier. This will have an XML file named web.xml as the Deployment Descriptor. This Deployment Descriptor is used by the Web Container to deploy the web application correctly.

EAR - Enterprise ARchive

An enterprise application may be composed of several Web Applications and other independent JARs. This archive file format is used in those cases to bundle all the components of an enterprise application into a single file. Again the purpose is same - making deployment, shipping, and hence the maintenance easier. Since, an enterprise application may have several Web Applications as its components, hence an EAR file may contain WARs and JARs. An EAR also contains an XML-based Deployement Descriptor, which is used by the Application Server to deploy the enterprise application correctly.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question