tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Mooring <Chris.Moor...@connaught.plc.uk>
Subject Overlapping contexts?
Date Mon, 23 Jan 2006 10:21:37 GMT
Hi All,

I was just wondering if it is possible to have "overlapping contexts"? I am
not sure if this will make sense so I'll try and explain it with a little
example;

Basically, I'd like to be able to have two *similar* URL's map to separate
locations on the filesystem;

Example; 
localhost/myapp/index.jsp (refers to C:\myapp\index.jsp)
localhost/myapp/external/index.jsp (refers to Z:\otherapp\index.jsp)

Ideally, I'd like to achieve this using Tomcat's

<Context path="/myapp" docBase="C:/myapp" 
... >
<Context path="/myapp/external" docBase="Z:/otherapp/" 
... >

element in server.xml. The important part here is that both contexts begin
with /myapp!

However, the last time I tried this, I had several different errors when
Tomcat started up. I believe this may be due to the fact that with Tomcat
5.5 and above you shouldn't have context tags in server.xml. Therefore, I
tried similar things in conf/context.xml with much similar results (errors).
I then tried separate context files in C:\tomcat5\work\Catalina\localhost
but this didn't work either. 

Can someone tell me if what I am trying to do is possible? If so, a hint in
the right direction would also be appreciated ;)

Regards,
Chris


Connaught honoured AIM 'Decade of Excellence' Award 

Connaught awarded Partnering Contractor of the Year 2005 

Connaught wins AIM 'Company of the Year' award 2004 

West of England Business of the Year Award Winner 2003 

Why not visit our website http://www.connaught.plc.uk 

Disclaimer: 
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error, please contact the sender and delete this message. 

Connaught plc, Head Office 01392 444546 

The presence of this footer indicates that this message has been scanned for
viruses by Network Associates Group Shield

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message