tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Single webapp multiple contexts
Date Tue, 09 Nov 2010 17:22:00 GMT
On 09/11/2010 17:18, Caldarale, Charles R wrote:
> From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com] 
> Subject: Single webapp multiple contexts
> 
> I am trying to create multiple 'dynamic' contexts using just a single
> code base. For example we currently deploy a webapps within a context of
> let's say 'A'. This listens quite happily for requests coming in the
> form of http://localhost/A/index.htm. What I need to be able to do is
> have this same code base also listen for requests in the form of
> http://localhost/B/index.htm.
> 
> You don't say if you want a single webapp instance, or a separate instance for each URI
path.  Assuming the latter, the only safe way to do it is to have separate .war files or directories;
anything else will cause timing problems.  Just copy the .war file (or directory) as needed
to the properly named location, and get rid of the <Context> elements from server.xml
(almost always a bad place for them).

Although if you want a single WAR but multiple deployments of that WAR,
place it somewhere outside the appBase and create multiple references to
it in CATALINA_BASE/conf/<enginename>/<hostname>

Mark

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


Mime
View raw message