Hi,
Is there any way for the servlet to distinguish between a request from a button click(form submit) versus a request from the "Refresh" or "Reload" button of the browser? Thing is, we are trying to disallow/(not process) requests from the latter.
Just looking for better alternatives to loading the page in a new window with no browser buttons.
Any advice is very much appreciated! Thanks in advance!
-
Refresh/Reload page vs Button click - Help! (3 messages)
- Posted by: R B
- Posted on: March 11 2002 20:06 EST
Threaded Messages (3)
- Refresh/Reload page vs Button click - Help! by Vivek Srivastava on March 11 2002 23:10 EST
- Refresh/Reload page vs Button click - Help! by Aditya Anand on March 12 2002 14:06 EST
- Mulituser environment by Dirk Ulrich on September 22 2006 03:53 EDT
-
Refresh/Reload page vs Button click - Help![ Go to top ]
- Posted by: Vivek Srivastava
- Posted on: March 11 2002 23:10 EST
- in response to R B
Take a look at struts framework. It has the feature to avoid resubmitting the form on refresh. -
Refresh/Reload page vs Button click - Help![ Go to top ]
- Posted by: Aditya Anand
- Posted on: March 12 2002 14:06 EST
- in response to R B
You can do this by issuing an incremental formID to the form. When a form is submitted, store the formID in the user session. When a form is submitted check if the ID is less than or equal to the ID you alredy have in the user session, that way you can tell if a user has alredy submitted the form onece
Cheers
Adi -
Mulituser environment[ Go to top ]
- Posted by: Dirk Ulrich
- Posted on: September 22 2006 03:53 EDT
- in response to Aditya Anand
Hello, Adi. Maybe I have a lack of basic JSP/Servlet knowledge but: If I use a counter ID to find out if a form has been already submitted. what about this scenario: User A loads the JSP with the form. User B loads the JSP with the form, too. User A submits the form. The controller receives it and everything is OK incrementing the counter. User B now submits the form and the controller says: 'No, your counter is not valid.' (Because the submitted counter is lower than the controller's counter). Where is my logical error? Regards, Dirk