I'm developing a JSF application which has an image upload function. I'd like to display the uploaded image. The uploading works fine but when I delete the uploaded picture and upload a new one, the old one is displayed in the browser. I typed the link of the picture in the browser but I sill get the old one. I use the same file name and I would not like to change it. How could I refresh it. (without Javascript). I'm using Glassfish Server. (Redeplyoing the application I get the new picture but it isn't a solution for an online system ;)) Thank you.
Asked
Active
Viewed 1,514 times
1 Answers
0
Redeplyoing the application I get the new picture
Don't store it in the deploy folder by getRealPath()
and consorts. Store it outside the deploy folder.
See also:
-
Hello. Thank you. I changed the code, it was very useful. Unfortunately the problem is still exists. I have to refresh the page manually in the browser after the file is uploaded. – user1213679 Mar 15 '12 at 07:21