tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Single webapp multiple contexts
Date Tue, 09 Nov 2010 17:18:39 GMT
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).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

 


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


Mime
View raw message