Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference war and ear

 
Mike Himstead
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

what is the difference between a war file and an ear file? They are both normal zip files format-wise (right?), but what are the differences regarding their purpose?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No difference in their compression format, just their purpose. An EAR is an enterprise application that may include a number of web applications, ejb applications etc. A WAR is specifically a web application. There are rules about how the contents of each should be structured in the JEE specification.
 
Mike Himstead
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So a war file can be a subset of a ear file but still be able to stand alone (if the application provides for it)?
 
Mike Himstead
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just realized that my question was worded badly: is there any diagram (I'm a visual guy, I'm afraid) that shows an EAR's structure with possible content?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or check out http://www.coderanch.com/t/319377/EJB-JEE/java/differences-between-WAR-file-EAR

The thread that is only three threads below this one right now.


Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic