My Upload script works fine (JSF 2 and Primefaces). I can upload, show in the web, insert filename to database but when I reboot the server, the files are gone !
I noticed that the deployed project store in the Jboss Temporary directory, so when you restart the server, the old deployed project will be deleted.
So, please give me the solution that I could keep all the file uploaded even I reboot the server
Thanks !
I’ve found the solution, very easy, just extract the .war or .ear folder and put it in the Jboss’s deploy folder
For Example I have the project structure like this:
Now just extract 2 folders MySweetHome.ear and MySweetHome_Client.war by using Winrar and we have
And deploy with JBoss, now the uploaded images won’t be wiped out by the server after rebooting !