What is difference between War file and Ear file?

Showing Answers 1 - 8 of 8 Answers

rasik patel

  • Apr 20th, 2006
 

war file is web application files only.ear file is complete j2ee application file that contain all (.jar,war,client)

  Was this answer useful?  Yes

meetnaveen4u

  • Apr 25th, 2006
 

hi,

War - This is Web Application archive which contains basic web application like servlet, jsp, html. This can be run on simple tomcat server.

EAR - This is enterprise application which can have many War and EJB and other j2ee components into it and this can be run on weblogic , websphere.. and other server which supports enterprise application.

Thanks

Naveen.

  Was this answer useful?  Yes

Saurabh Raisinghaney

  • May 3rd, 2006
 

An ear file consists of application.xml as its deployment descriptor and it consists of war jar and par files

  Was this answer useful?  Yes

srinivas

  • May 22nd, 2006
 

hi

       A J2EE application is packaged as a portable deployment unit called an     enterprise archive (EAR) file. An EAR file is standard JAR file with a .ear  extension. An EAR file contains:

  • One or more J2EE modules
  • A J2EE application deployment descriptor

Unlike other deployment unit types, a WAR file usually cannot be loaded by a classloader, because its internal directory structure differs from that of a loadable JAR file. Like other module types, a WAR file may be deployed independently as a Web application or packaged in an EAR file and deployed as a J2EE application.

ok bye..............

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

  Was this answer useful?  Yes

hi

       A J2EE application is packaged as a portable deployment unit called an     enterprise archive (EAR) file. An EAR file is standard JAR file with a .ear  extension. An EAR file contains:

  • One or more J2EE modules
  • A J2EE application deployment descriptor

Unlike other deployment unit types, a WAR file usually cannot be loaded by a classloader, because its internal directory structure differs from that of a loadable JAR file. Like other module types, a WAR file may be deployed independently as a Web application or packaged in an EAR file and deployed as a J2EE application.

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

"HELP EVER HURT NEVER"&"IMPOSSIBLE AS POSSIBLE"

Note:If any one want java materials like e-books,faq's send a mail to my id.if any doubts regarding java send a mail to my id, if possible i will send answers.if any one want how to install java softwares ,tomcat,weblogic,eclipse,jbuilder etc and how to use plz send amil or ask online also i will definitly tell.

  Was this answer useful?  Yes

hi

       A J2EE application is packaged as a portable deployment unit called an     enterprise archive (EAR) file. An EAR file is standard JAR file with a .ear  extension. An EAR file contains:

  • One or more J2EE modules
  • A J2EE application deployment descriptor

Unlike other deployment unit types, a WAR file usually cannot be loaded by a classloader, because its internal directory structure differs from that of a loadable JAR file. Like other module types, a WAR file may be deployed independently as a Web application or packaged in an EAR file and deployed as a J2EE application.

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

"HELP EVER HURT NEVER"&"IMPOSSIBLE AS POSSIBLE"

Note:If any one want java materials like e-books,faq's send a mail to my id.if any doubts regarding java send a mail to my id, if possible i will send answers.if any one want how to install java softwares ,tomcat,weblogic,eclipse,jbuilder etc and how to use plz send amil or ask online also i will definitly tell.

clickon:http://in.geocities.com/bora_srinivasarao/MyHomepage.html

For java Click on it:http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/DEA2eIX.html

  Was this answer useful?  Yes

what is difference between War file and Ear file?

  • Oct 12th, 2011
 

jar files: These files are with the .jar extension. The .jar files contain the libraries, resources and accessories files like property files.
.war files: These files are with the .war extension. The war file contains the web application that can be deployed on the any servlet/jsp container. The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.
.ear files: The .ear file contains the EJB modules of the applications.

  Was this answer useful?  Yes

JAR - Java ARchive
Its a file format based on the ZIP file format and similar to ZIP format this is also used for aggregating many files (many be of different types) into one aggregate file. This aggregate file will have (.jar) extension. Application development using Java uses JAR files for many useful purposes. One of the most common use is to package all the .class files, image files, and other files required by an Applet into a JAR file, so that the download of a single file will have all the components downloaded at the client machine.
This archive file format is platform-independent format which has been fully written in Java. This format is capable of handling audio and image files in addition to the .class files. Its an open standard and fully extendable. JAR file consist of a ZIP archive and an optional Manifest file, which contains package and extension related data. The Manifest file will have the name MANIFEST.MF. This manifest file belongs to the optional directtory named META-INF. This directory is used to store package and extension configuration data, security related data, versioning related data, services related data, etc.

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions