aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Deployment question: put wars in a EAR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Deployment question: put wars in a EAR" Watch "Deployment question: put wars in a EAR" New topic
Author

Deployment question: put wars in a EAR

ernie chung
Greenhorn

Joined: Jul 17, 2007
Posts: 2
I would like to know under what circumstances we should put wars into one ear. If I have two web applications, each use their own database, should I put the two WARs into the same EAR? Thanks.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

If they are part of the same enterprise application, then yes.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
ernie chung
Greenhorn

Joined: Jul 17, 2007
Posts: 2
Thanks for the reply.

But I am still not very clear about the concept...

Suppose each WAR is already a complete web application. Can we put both WARs under the same EAR? If yes, then, both WAR contains WEB-INF/web.xml, which xml file the application is referring?
Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

Each war would have a different context-root.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Deployment question: put wars in a EAR