----------------------------------------------------------------
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!!!
----------------------------------------------------------------
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.
Try reading the config file in the processRequest method instead.
jae
> -----Original Message-----
> From: Thad Parker [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 09, 2000 3:39 PM
> To: Java Apache Users
> Subject: Reloading Properties file
>
>
> ----------------------------------------------------------------
> 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!!!
> ----------------------------------------------------------------
>
> I'm currently using a properties file to store some HTML and
> stylesheet
> stuff and I'd like to be able to get a servlet to reload the
> file on command
> via a /servletname?reloadprops=1 request. Once the file is
> loaded, the
> values are copied into global vars.
>
> I sort of have it working, but it only works once. I
> recompile the servlet,
> the properties file is read during the init process. Once
> its running, I
> make a change to the properties file and give the servlet the
> /servletname?reloadprops=1 request. It reloads the file and
> everything is
> fine. If I make another change, and reload it, it says
> everything is fine,
> yet the new data isn't there. It returns the old data.
>
> What could I possibly be doing wrong? Is there a better way
> to do this? I
> just hate having to recompile the servlet just to change the HTML.
>
> Apache 1.3.12
> Solaris 2.7
> JDK 1.2.2
>
> Thanks,
> Thad
>
>
> --
> --------------------------------------------------------------
> 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]