tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
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" <>
> Reply-To: Tomcat Users List <>
> To: "''" <>
> 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).


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message