I working on attachment functionality on
JSP page
Here are the steps I follow
1) On the jsp page I selects the file clicks the "Attach" link.
2) The request goes to a
servlet which uploads the file to a directory.
3) The servlet shows the messgae "Your file has been uploaded", and a close button below that.
In the servlet I've set the filename in the session object.
4) When I click the "CLOSE" button, the servlet takes me back to the JSP page.
On the "CLOSE" button, I'm using "history.go(-1)", which will take me to the previous page
5) On the JSP page I'm displaying the name of the file, by retrieving from the HttpSession object.
However the file name dosen't get displayed.
When I click the browser's refresh button, the file name gets displayed
Please let me know why the JSP is not able to retrive the value from the session object.
Is it because I haven't submitted a new request.