On 09/11/2010 17:18, Caldarale, Charles R wrote:
> From: Rob Gregory [mailto:rob.greg...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to