----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Ah, this must mean the class is instantiated for each
alias then. Cool - I can do this.
-Freeman
-----Original Message-----
From: Tom O'Connor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 31, 2000 2:41 PM
To: Java Apache Users
Subject: RE: Zone initargs problem...
----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Freeman
> Pascal
> Subject: RE: Zone initargs problem...
>
> We declared the variables that held the init args as class
> (static) variables. Depending on which zone got started
> first would determine the initial value of these static
> attributes.
Put the init args in instance variables, not static variables. In the
servlet init() method, query using getInitParameter() and stash the values
in the instance variables. Doing getInitParameter() on each doPost() and
doGet() would be overkill.
I have two servlets in the same zone that both share the same code (but with
different aliases). I use aliases to configure them with different init args
using instance variables to hold the config params and it works just fine.
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]