EAR and WAR

Discussions

General J2EE: EAR and WAR

  1. EAR and WAR (5 messages)

    Hi i am working on J2EE. I want to know basic difference between EAR and WAR.

    Threaded Messages (5)

  2. RE: EAR and WAR[ Go to top ]

    EAR: Enterprise ARchive WAR: Web ARchive A EAR is used by JEE server. Some JEE server requires to package application in EAR (IBM WAS 6.1 for example). Some others accept WAR packages. A WAR is used by servlet container (sub part of JEE standard). A servlet container could not understand a EAR package.
  3. Re: RE: EAR and WAR[ Go to top ]

    Thanks for the reply.. So does it mean that there can be same contents in files. We just name them differently. If we want to deploy on Websphere(J2EE server) we name them ear and if wanna deploy on servlet container we name them war??
  4. Re: RE: EAR and WAR[ Go to top ]

    WAR is basically the web component containing the files like servlet, jsps, html. It can be run on any web container like tomcat or a j2ee application container which comprises of a web container like weblogic, websphere etc. EAR is an enterprise application which can consist of web applications(WAR) and/or enterprise bean components(JAR). It needs a j2ee application container to run on like weblogic, websphere. It cant be run on simple web containers.
  5. Re:Re: RE: EAR and WAR[ Go to top ]

    Reuse the same package and just rename it... Unfortunately not... EAR is standardized in JEE standard and contains some meta files that explain how the JEE container should react when the EAR in launched. In the case of websphere, this EAR can contains some proprietary files for specific IBM availabilities. However to create a generic EAR that follows the JEE standard, you can read this: http://www.eclipse.org/webtools/jst/components/j2ee/scenarios/jee5_application_creation_tutorial.html.
  6. Re:Re: RE: EAR and WAR[ Go to top ]

    Thanks for replies.. They were really helpful:)