cancel
Showing results for 
Search instead for 
Did you mean: 

difference between .war file and .ear file

Former Member
0 Kudos

Hi,

what is the difference between .war file and .ear file ?

Please let me know with appropriate explanation.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi rakesh

.war file - Wab application Archive contains the web application that can be deployed on any servlet/ JSp container.

the .war file contains jsp,html,javascript and other files necessary for the development of web applications(basically front end developments).

.ear file - is a Enterprise Application archive which is general J2EE application.It contains the EJB modules of the applications,it might contain a web app(i.e .war file). A full J2EE container like websphere,weblogic etc is required to deploy these.

Answers (3)

Answers (3)

gill367
Active Contributor
0 Kudos

War file means web application archive. It is archived file having a collection of JSP, servlets and static pages that together costitute a web application. It contains one WEB-INF directory which will have a file named web.xml which defines the structure of the web application.

On the other side EAR file is Enterprise application archive. It is file having packaged content of one or more modules into a single archive so that the deployment of all the modules can be done simultaneously on the application server. It also contains XML files called deployment descriptors which gives the details of the deployment method. This deployment descriptor will be present in the folder META-INF folder.

So the main difference betwwen the two is that Ear file is having collection of various modules to be deployed on the application server while the WAR file is used to deploy the web applications.

p330068
Active Contributor
0 Kudos

Hi Rakesh.

WAR and EAR is nothing but the Archive files for different application.

WAR - Web Application Archive

EAR - Enterprise Archive

Please check this

http://wiki.answers.com/Q/What_is_the_difference_between_Jar_and_Ear_and_War_files

Hope it helps

Regards

Arun

Former Member
0 Kudos

Hi,

war - War file bundles a set of resources like static html pages,JSP's and .jar files together and can be deliver as a web application.

ear - Ear file clubs a set of war files,jar files and a set of enterprise app resources like EJB's and ejb-related descriptors etc.

Regards,

Saravanan K