Home » Interview Questions » J2EE Interview Questions » What are ear, war and jar files? What are J2EE Deployment Descriptors?
 

What are ear, war and jar files? What are J2EE Deployment Descriptors?

ear, war and jar are standard application deployment archive files. Since they are a standard, any application server will know how to unpack and deploy them.

An EAR file is a standard JAR file with an ".ear" extension, named from Enterprise Archive file. A J2EE application with all of its modules is delivered in EAR file. JAR files can’t have other JAR files. But EAR and WAR (Web Archive) files can have JAR files.

An EAR file contains all the JARs and WARs belonging to an application. JAR files contain the EJB classes and WAR files contain the Web components (JSPs, static content (HTML, CSS, GIF etc), Servlets etc.). The J2EE application client's class files are also stored in a JAR file. EARs, JARs, and WARs all contain an XML-based deployment descriptor.

Deployment Descriptors
A deployment descriptor is an XML based text file with a ".xml" extension that describes a component's deployment settings. A J2EE application and each of its modules has its own deployment descriptor.



Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code: