I am tring to upload a file using struts2.File uploading is successful.I tried out many hints from stack overflow,but still failed to find a solution for this.
Nw when i try to change the image,the new image appears only after clearing the cache.It does not change spontaneously.The struts2 framwork makes use of tiles and the images are getting displayed on header and leftContainer.
The file is named after the memberId logged in..(which is stored in session)
I made use of fileUpload code from: http://www.tutorialspoint.com/struts_2/struts_file_uploads.htm
destPath = org.apache.struts2.ServletActionContext.getServletContext().getRealPath("/");
destPath = destPath + "images";
//where images are stored in images folder of webapps..
When i try uploading a new image,this image will be renamed by the memberId of the loggedin member(stored in session).
What my exact problem is that, new file is getting successfully uploaded to the images path.It is also renamed correctly.But this new image appears only when i either refresh the page or clear the cache.Why is this so??
How can refreshing be avoided?
Please help..........