File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Form submission in struts 1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form submission in struts 1.2" Watch "Form submission in struts 1.2" New topic
Author

Form submission in struts 1.2

rajesh v
Greenhorn

Joined: Aug 01, 2008
Posts: 3
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

Joined: Oct 29, 2001
Posts: 8877
    
    8

Please check your private messages here for an important message.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jules Bach
Ranch Hand

Joined: Apr 28, 2008
Posts: 71
I am not sure how your code fits together..perhaps changing the scope to a request rather than session?
Kanchan Singh
Ranch Hand

Joined: Dec 27, 2007
Posts: 38
Hi
Try using tokens. This should solve your problem of resubmission on refresh.
rajesh v
Greenhorn

Joined: Aug 01, 2008
Posts: 3
Hi Kanchan Singh ,
Can you please explain it with an example code.
thanks ,
rajesh
 
 
subject: Form submission in struts 1.2