I have a List Student page and a update page, everytime I updated, I use response.sendRedirect("ListStudent.jsp") back to the List Student page, but I have to click refresh button, then the record on the page changed, what I should do to make it automatic refresh? Thanks
You don't need to force the page to refresh, what you need is to prevent it from being cached in the first place. That's been discussed more times than I can count, so please do a search for this issue.
I am sorry, but "request.forward<url>" doesn't work. It gives me a tomcat error. And I used <meta> before, it only refresh every one miniute. I think that is not what I want, I want it just refresh when List Student page is re-opening
Please re-read my reply. You do NOT need a refresh. The browser is pulling up your old page from the cache. What you need to do is to prevent the page from caching.
Joined: Feb 24, 2004
I found these code about prevent reload the page from cache "response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma", "No-cache"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); " where should I put it? Could you tell me what I should do, thanks
If you are sure that you are sending the new data to the page after the update (are you?) then if it is showing the old data, you have a cache problem. It is possible that your problem lies in code logic, but that isn't borne out by the fact that a refresh brings up the new data.