This makes a lot of sense. Could you please describe the steps to deploy the
application with the deploy.tomcat Target of the Struts build.xml? Thanks.

Ying

-----Original Message-----
From: Uwe Pleyer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 3:13 AM
To: [EMAIL PROTECTED]
Subject: Re: update database.xml


Hi,

the problem is the logic of Tomcat. If you deploy the application as *.war
file
in the webapps directory of Tomcat, at start time a directory with the same
name as the *.war file will be created and the contents of the *.war file
unpacked into this directory. So far so good, all entries in database.xml as
in
in the *.war file are available.

During shutdown the database servlet overrides the database.xml file with
the
new User-list out of the hashtable, thats already fine. But after doing all
this work, Tomcat destroyes the subdirectory of your application!!!
Everything
gets lost.

If you deploy your application with the deploy.tomcat Target of the Struts
build.xml, no *.war file will generated. Instead the Applications
subdirectory
itself is created, so Tomcat leaves everything as it is. Now the Users are
written back to database.xml at shutdown and reread at startup of Tomcat.

Another possibility is to use an path to the database.xml file wich is
outside
of the webapps directory, but I don't know if there are limitations due to
security reasons.

Greetings
Uwe

Ying Teng schrieb:

> Hi all,
>
> I have a question to ask. I want to update the database.xml file and the
> database hashtable of the DatabaseServlet class every time the user
> register. So when the user logs on next time (even after the tomcat is
> restarted), he/she can still log on. Any idea?
>
> Thanks.
>
> Ying
>
> P.S. I already successfully updated the database in the perform function
of
> the SaveRegistrationAction class.


Reply via email to