On Mon, 17 Sep 2001, Dave Ford wrote:

> <<Do you mean web-app or servlet?>>
> I mean web-app.
>
> > Startup parameters
> > are defined in the
> > web.xml file.  So
> > just specify the
> > appropriate startup parameters in
> > the web.xml files,
> > and each web-app will have its own.
>
> That's the problem. I want each web-app instance to have it's own
> params.

*What's* the problem?

You have myServer/wa1 and myServer/wa2, say they correspond to the
directories .../tomcat/webapps/wa1 and .../tomcat/webapps/wa2.  Then
their respective web.xml files are located at
.../tomcat/webapps/wa1/WEB-INF/web.xml and
.../tomcat/webapps/wa2/WEB-INF/web.xml.  In the first one, you put the
startup parameters for wa1, in the second, the ones for wa2.

Again, what's the problem?

Alternatively, you could put a configuration file somewhere in the
directory structure, put the startup parameters in there, and have the
web-app read them from there.

Somewhere, though, those two web-app directory structures are going to
have to differ if they're going to be different (i.e. have different
startup parameters).


> ----- Original Message -----
> From: "Milt Epstein" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 17, 2001 10:02 AM
> Subject: Re: Multiple instances of one web-app
>
>
> > On Mon, 17 Sep 2001, Dave Ford wrote:
> >
> > > Suppose I want to have two instances of the same web-app running at
> > > 2 different URLs:
> > >
> > > 1. myServer/wa1
> > > 2. myServer/wa2
> > >
> > > Now suppose I want to have different startup parameters for each
> > > web-app. Is there a standard way to do this?
> >
> > Do you mean web-app or servlet?
> >
> > web-apps are pretty much totally distinct, they have their own
> > contexts and web.xml files.  Startup parameters are defined in the
> > web.xml file.  So just specify the appropriate startup parameters in
> > the web.xml files, and each web-app will have its own.
> >
> > It's also possible to define multiple instances of the same servlet in
> > one web-app, and have each instance have its own startup parameters.
> > In the web.xml file, the init-param tag goes inside the servlet tag
> > (i.e. the startup parameters are particular to a servlet definition).
> >
>

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to