Chris, dont think you can... just so I understand it.... you thinking
http://localhost:8080/A
http://localhost:8080/B
http://localhost:8080/C
must all map to one web-app, say WebApp A.... that I dont think is possible
But if you not using ROOT for anything else other than Welcome to Tomcat,
then you can try this...
You rename your WebApp to ROOT
Make the context path "" (nothing)
And then those A,B and C's no longer represent Web Apps, they represent
servlets.
You can MAP away merrily in web.xml
ie /C to servlet A
/B to servlet A
/C/doSomething to servlet E
etc etc etc.....
maybe.... depends wot you doing I guess, and if ROOT is yours to take.
otherwise.... little webapps that redirect is another possibility.
Apache in front could probably also map any URI to just about anything.
Anyway.... hope more ideas come forward for you...
----- Original Message -----
From: "Chris Hall" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, June 21, 2007 11:51 PM
Subject: Multiple Contexts from single WAR
Hi, I'm experiencing some issues with getting correct behaviour on
deploying
multiple Contexts based on a single WAR. I need to do this because whilst
my
application is common to multiple contexts, I need to control
RemoteAddress
access to some of them via the relevant context Valve.
I have defined multiple contexts in conf/catalina/localhost/*.xml each of
which use a common docBase and this appears to create each of the webapps
on
start-up.
However the servlet-mapping entries that are defined in the common
web-inf/web.xml do not appear to be applied in accessing the copied
context.
For example the url-pattern which redirects to a servlet does not take
effect on the copied context definition, whereas it does apply on the
webapp
that is named after the originating WAR.
I guess I could deploy multiple WARs each named differently, but that
seems
to defeat what the common docBase is trying to achieve?
Is this behaviour expected? All comments gratefully received.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]