• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form submission in struts 1.2

 
rajesh v
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when i insert new data and submit the form the data is inserted into the database correctly, and i am able to view the data but when i refresh the browser the form is submitted again and i am getting the data which was inserted just before.
How can i prevent this?
Please help me...
 
Joe Ess
Bartender
Posts: 9314
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check your private messages here for an important message.
 
Jules Bach
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure how your code fits together..perhaps changing the scope to a request rather than session?
 
Kanchan Singh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Try using tokens. This should solve your problem of resubmission on refresh.
 
rajesh v
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kanchan Singh ,
Can you please explain it with an example code.
thanks ,
rajesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic