Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Data of previous form gets submitted on refersh

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
I am developing a web based application using jsp and servlet. In this application I have login page, validation servlet if user is valid user I called the another servlet which retrieves the form names from database and this data is send to jsp page where use has to select form. On the submit event of this jsp page again I call one servlet which retrieves form data from database. And send data to next jsp page on this jsp page user has to fill the form and on submit action i have called servlet to update data into database. And after successful submission of data I have redirected the response to previous servlet which retrieves next form data from database. But if here I press refresh button the previous form data gets submitted into database with new form.

Can any one please help me to solve this problem?
I have use the no cache control in all my jsps and servlets.

Thanks in advance

Regards,
Amol
 
Marshal
Posts: 67497
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure that the last action is a redirect? it sounds like you are leaving the POST as the last action.
 
Amolk Patil
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for response Bear Bibeault.

I used RequestDispatcher to go back to previous servlet.
 
I'm still in control here. LOOK at this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic