I am developing a java web software with jsf in a team. We don’t want to use a database, but want the persistence done by simple files on the filesystem. Please don’t ask why and say that it is stupid, because it is in most cases.
We can’t really say something like D:/data or /home/user/data is the place to put the data, because maybe someone is using windows, mac or linux.
Is there some standard way of saving files through the application server that will survive a restart and maybe even a redeployment of the app, update of the server and so on – real persistence? If not, is there a tomcat solution?
The standard does not provide access to a location in the file system where a web application can have read/write access to arbitrary files.
You can, however, designate a location and pass in the location through a system property or a property file.
If you just want to have user information available with session scope, then consider putting serializable objects in the session and let the container manage it.