aspose file tools*
The moose likes Servlets and the fly likes Differentiate between refresh/submit actions in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Differentiate between refresh/submit actions in servlet" Watch "Differentiate between refresh/submit actions in servlet" New topic
Author

Differentiate between refresh/submit actions in servlet

Devesh H Rao
Ranch Hand

Joined: Feb 09, 2002
Posts: 687

Hi ppl
can u pls help me out on this....
i want to know on the server side what action on the client side caused the data to be posted to the server...for eg i want to differentiate between refresh and submit actions on the client side in the server component ...please suggest a way by which i can identify in the servlet what action in the browser caused the data to be posted......
thanx......
Alexander Pantaleev
Greenhorn

Joined: Jun 14, 2002
Posts: 5
I'd be very much interested to read an answer to that question, too.
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
correct me if im mistaken, but only submit post the information to the server no?
refresh just refreshes the form???
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Depending on how the page was accesed, Refresh can also post the information to the server.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
Not sure if this is what you mean, but two good ways to keep track of the status of the client - server conversation are cookies and hidden variables in forms.
Also note that when a form submit button is clicked, the name of the button appears in the request parameters. This does not happen in a refresh.
Bill
 
Don't get me started about those stupid light bulbs.
 
subject: Differentiate between refresh/submit actions in servlet