Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

how two deploy two war with same context root  RSS feed

 
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
 
Rancher
Posts: 42975
76
  • 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?
 
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
 
author & internet detective
Marshal
Posts: 38504
653
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.
 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!