Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how two deploy two war with same context root  RSS feed

 
Parul Tripathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I need to deploy two different .war file with same context root in RAD(Rational application developer). i.e two .war file should be in .ear file and should have same context root. is it possible?? pls reply
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt it. How would RAD decide which web app got a request if both were configured to listen to it? What is the underlying requirement? Why won't two web apps with distinct URLs do?
 
Some One
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The J2EE 1.4 spec defines:
Each web module must be given a distinct and non-overlapping
name for its context root.



You might read the doc @ J2EE 1.4 spec
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parul Tripathi:
Hi, I need to deploy two different .war file with same context root in RAD(Rational application developer). i.e two .war file should be in .ear file and should have same context root. is it possible?? pls reply

It's not possible using this approach. You could create a new web.xml that merges the two separate ones and place it in a third war. That war would map to the context root and delegate to the appropriate servlets based on URL within the context root.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do this Parul ? Even if yo were to merge the two web.xml into a new one you need to be sure there are no conflicting elements.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!