• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Differentiate between refresh/submit actions in servlet

 
Devesh H Rao
Ranch Hand
Posts: 687
Hibernate jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd be very much interested to read an answer to that question, too.
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
correct me if im mistaken, but only submit post the information to the server no?
refresh just refreshes the form???
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on how the page was accesed, Refresh can also post the information to the server.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic