I'm working on a jsf2 web application and i need to upload files to a folder in my webcontent and keep them permanently, I used the technique that is mentioned in JSF FileUpload Directory and i could upload to wtp... folder's subfolder, but as BlueC said it get lost when tomcat restarts, is there any way to do that?
Asked
Active
Viewed 166 times
2 Answers
0
You can store the files in a Database using a BLOB field. It will depends of how you are implementing the persistence layer of your application but in the Java side usually you will implement this field as byte[]. So it will be comfortable for download or display the file.

Ernesto Campohermoso
- 7,213
- 1
- 40
- 51
0
You can upload the files to a certain directory/ default directory and then manually copy the files to a secured folder that is outside of the deployment directory and application server installation (yes you can do that).

r0ast3d
- 2,639
- 1
- 14
- 18