• Post Reply Bookmark Topic Watch Topic
  • New Topic

differences between WAR file and EAR file

 
Nikitha Reddy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
Tell me the differences between WAR file and EAR file?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

A WAR file is a Web Application Archive - containing servlets, JSPs, and their supporting classes and files. A servlet container like Tomcat is required to deploy these.

An EAR file is an Enterprise Application Archive, which is a general J2EE application. It might contain a web app, but also EJBs. A full J2EE container like JBoss, WebSphere, WebLogic etc. is required to deploy these.
 
Anant Jagania
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got a doubt here,

We can deploy the web applications as well as EJBs separately on an application server, then why do we need a EAR?

Is it possible to use web application and EJBs deployed separately on a server?

Regards,
Anant
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
App servers aren't required to support deploying loose EJBs. If yours is, it is probably creating an EAR behind the scenes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!