• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Refresh problem

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

In struts project, there is a jsp page which includes a list of numbers with user names. There is a text filed for user to input name, then there is a button to generate a number. Once the user input the name and press the button, the jsp page will submit a form to action which contains the user name, the action will create a number for this name and returns the form (name and nubmer and other field) to the same jsp page. And the number and user name will show on the page. At the time if user click Refresh button of the browser unexpectly, a new number will created for the same user which is not wanted.

I tried to put no-catch in meta in head part, also I tried to empty the text filed right after the form get value in jsp page, but did not work. Could anyone help to explain what really happed behind the screen if Refresh is clicked and give some advice on how to avoid this?

Thanks for the help in advance.

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post-redirect-get pattern.
 
david arnold
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you David. I am looking at the pattern and learning.

Regards.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic