Difference between EAR and WAR files

Difference between EAR and WAR files

*.war file – this file is a composition of servlet class files. This package is HTTP request/response capable, can be accessed by a URL and can return a page. The contents are Java Classes, JSP files, GIF ( for website images ), and HTML files. Can be deployed on a Tomcat or Jetty servlet container.

*.ear file – this file is the composition of a enterprise application, that is composed of several war and ear files that functions as a single application. ear files are usually complete with HTTP request/response capability, Database access, Exposed API’s and other fucntionalities. EAR files are deployed on application servers such as Weblogic, JBoss or IBM Websphere. If you deploy a war file on application server, it is wrapped to an ear file, for standard deployment.

*.jar file – is the basic java archive file. A compilation of Java Classes that functions as a single application. May include Java Classes only.

Here are some more detailed answers on stackoverflow.com
http://stackoverflow.com/questions/1594667/war-vs-ear-file

Advertisements

One thought on “Difference between EAR and WAR files

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s