Re: redirect to a URL when a user enters Refresh button
Thursday, October 11, 2001 10:07 AM
When the initial servlet request is made, create a session (you may put some identification parameters into the session).
The created session will send a cookie to the client.
If the client (browser) is refreshed, check if the servlet parameters have changed, if not, you know it's a refresh.
Redirect the client via res.sendRedirect(targetURL).
Alternatives: place a small applet into the browser and intercept the refresh and Ctrl+refresh events.