struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scaduto" <>
Subject RE: Database Servlet
Date Tue, 05 Feb 2002 18:43:45 GMT
You could keep a reference to the last modified date of the xml file when
you init the servlet and then check the timestamp every time your main page
runs.  If it changes the re-run the digester.


If you don't have access to the timestamp then, you could refresh at
periodic intervals on a different thread. And then replace the old java
beans in the ServletContext.


You can read the file every time if the page needs to be in sync at all
times. This is the most accurate solution but not the most efficient.

Hope this helps,


-----Original Message-----
From: Konstantina Stamopoulou []
Sent: Tuesday, February 05, 2002 7:43 AM
To: Struts Users Mailing List
Subject: Database Servlet


I apologize if my question sounds naive but I really need your help on this.
 I have a servlet that during initialization parses an .xml file using
Digester. Then I access the data in  my jsps through JavaBeans. What I need
to do, is to have my main page which displays the data from the .xml to be
updated with the new data each time the .xml is modified.
In order to do this, do I have to put the code of the init() method of my
servlet in the Action class of the main page or is it a more elegant way to
do this?

Thank you  in advance,

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

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

View raw message