• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Refreshing jsp page

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,


I found a problem in my jsp page. I written a code for registration form. This form takes details from the user. I am taking the these details through bean(storing this bean in the request object). I am validating in the bean and giving the validation errors to the same jsp page.

On succesfull validation i am sending the details to another jsp(<jsp:forward page="x.jsp" /> ), from where i am storing these details in database. these details are stored in database. O.K ....


Now the problem when user comes back to the registration form by using back button on Internet Explorer tool bar and pressing the refresh button the details once again going to the database.

How to avoid that? i don't have to use response.sendRedirect("x.jsp") there.
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should look into using struts, as it sounds like your design correlates very strongly to how struts handles requests. Struts provides us with saveToken() and isTokenValid() methods. Here's how you can do it with jsp.



BTW, your token is put into the form as a hidden field.

[ August 13, 2005: Message edited by: Kerry Wilson ]
[ August 13, 2005: Message edited by: Kerry Wilson ]
 
If you were a tree, what sort of tree would you be? This tiny ad is a poop beast.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic