• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Multiple Contexts, Single Project/App

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to run multiple contexts but I have only one project/application. In Tomcat, I simply do a copy and paste in the application.xml file and change the name of the context, done.

In WebSphere, I go to the application.xml file and I get a GUI. So I try to add another context and it tells me I only have one project and it's already being used, or rather it already has a context pointing to it.

Does anyone know how to do this in WebSphere 5?
 
Bob Frapples
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone? Anyone? Bueller? Bueller?

Am I the only one to ever do this? Nobody knows?
 
Bob Frapples
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry to bump again, but this is a huge issue, and has to be something other are dealing with or will get burned on
 
author & internet detective
Posts: 39339
755
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brackish,
I don't know of any way to point to different context roots at the same time in WebSphere.

People aren't ignoring you It's either really hard or impossible.
 
Bob Frapples
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, then let's get more generic:

Does anyone know how to configure a web app so that when you deploy it you have 2. For example:

http://www.mysite.com/myApp1
&
http://www.mysite.com/myApp2

One single web project, but deployed as 2, so that each can hit a separate database. Anyone?
 
Jeanne Boyarsky
author & internet detective
Posts: 39339
755
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brackish,
That I know how to do!

Create an EAR with your first context root and deploy it. Change the context root, create another EAR and deploy that one.
 
Bob Frapples
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I've learned it's vendor specific. But the method you are describing sounds pretty nasty. For example, in Tomcat all you have to do is cut and paste about 5 lines of XML in the server.xml file and change the context name. Done. So you can create 10 contexts real easy. The way you're describing would take me all day to create 10 EAR files. Ouch! But I'm using WebSphere and stuck doing it the hard way (the IBM way).
 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In WAS 5 the context root can be dynamically mapped at server deployment time using the JACL scripting tool. However I don't know how to declare multiple context roots in WSAD.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!