tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Passing context parameters to we applications
Date Thu, 27 Jun 2002 18:58:57 GMT


On Thu, 27 Jun 2002, Corbin, Ken wrote:

> Date: Thu, 27 Jun 2002 10:28:15 -0700
> From: "Corbin, Ken" <Ken.Corbin@Summit.Fiserv.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: "'tomcat-user@jakarta.apache.org'" <tomcat-user@jakarta.apache.org>
> Subject: Passing context parameters to we applications
>
> What I've got is an application that serves three different customers.   I
> want to set up three different contexts that run the same application with
> three different databases.   Getting the three context configurations to
> point to the same docBase directory is no problem.  But how does the
> application determine which database to open?  I can probably dig the
> calling URL out of the request context and parse it myself, but that's an
> unsatisfactory solution.   What I really want to do is set a contextManager
> property in each context configuration and somehow pass it to the web
> application, but I haven't figured out how I can do that.
>

If you are using Tomcat 4.x, see the documentation on the <Parameter>
element nested inside a <Context>.  This allows you to configure a context
initialization parameter in server.xml (i.e. external to the webapp).

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/

Craig


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message