----------------------------------------------------------------
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!!!
----------------------------------------------------------------
Hi,
>> if you want that to work, then you'll need to put the reading of the config
>> parameters in something other that the init() method. Typically, the
init()
>> method is called only once, when the servlet is instantiated the first
time.
>
>There is a private method that actually loads the file and copies the values
>to global vars. This method is called in the init and when the correct
>querystring is present.
>
>> Try reading the config file in the processRequest method instead.
He's absolutely right.
The servlet init() method is only guaranteed to be called once in the
life of the servlet engine (or whenever the .class file changes and it is
reloaded). Once the servlet is instantiated in the servlet engine, it
services many requests (i.e. doGet()).
>I'd rather not do this since it would then load the file on every hit.
It wouldn't be load every hit. Only when you determine that the "correct
querystring is present".
>Thad
Stephen
--
--------------------------------------------------------------
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]