my dog learned polymorphism
The moose likes Servlets and the fly likes Detecting broswer refresh action from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Detecting broswer refresh action from servlet" Watch "Detecting broswer refresh action from servlet" New topic
Author

Detecting broswer refresh action from servlet

aj fernandez
Greenhorn

Joined: Feb 20, 2005
Posts: 1
I am trying to detect when a user clicks on the refresh button on the browser menu. I recently began working on a business application adn there seems to be a bug when the user clicks the refresh button. More specifically, it behave as a submit action to the server; thereby creating a new request for this application and that is NOT good. Please provide any details.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26218
    
  66

Aj,
There isn't a way to know that the refresh button was hit per se. However, you can store a token in the session so that if the user submits the same request again, you don't process it.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Detecting broswer refresh action from servlet
 
Similar Threads
Refresh the view
what does redirect attribute of action forward do when set to false
How to refresh MainWindow when SubWindow closes?
Avoiding multiple request at a time
Avoiding multiple request at a time