Howdy,

>OK, so my question - if I want to do this, where in the file system
should
>I stick the xml file so it doesn't get overwritten if the war is
>redeployed?  A user's home directory?  That will force the user to mess
>with the configuration.
>
>I'm a out of my league on this, so I'd appreciate any advice.  Of of
>course, I could give up on file storage and go with jdbc, but that
seems
>like overkill for this little app I am writing.

If you don't need the XML files to be persisted, you can read/write them
from the context's temporary directory (javax.servlet.context.tempdir
property).

If you do need them persisted, you have some options:

1) Pass in an init-param to one of your servlets a directory where these
files will be stored.  

2) Use JDBC and write the files to a database.  (This is not that bad a
solution, especially if your schema is easy and the files aren't huge).

3) Use JNDI and have a bean or service persist the files for you.

Good luck,

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to