This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a problem and I don't know the best way to do that.
The context: I have a webapp where I save, delete, update "server" and "user" from my webapp
in a file under /WEB-INF/classes/datafile.xml
Imagine I log me on the webapp as "administrator/administrator" (login/password), after that I
modify server informations then the webapp rewrite my datafile.xml under /classes in order to
update the modified informations for one server.
But when the datafile.xml is rewritten the web server reload the context and when the
web application being reloaded, all sessions are delete so requiring users to identify themselves again.
Anyone know the best practice for this case ?
I have found session-time out parameter in web.xml, but in this case it isn't a timeout ...
I have also found this "reloadable" attributes in tomcat configuration:
Pete is giving you good advice. Never write to the /classes folder. In fact, it's best to not write anywhere in the web app at all. Follow the advice of writing somewhere outside the app. That way, you don;t need to worry about what happens to the files when you redeploy the app.