File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Pls give reply as immediate as possible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pls give reply as immediate as possible" Watch "Pls give reply as immediate as possible" New topic

Pls give reply as immediate as possible

pasuparthi mokshavathi

Joined: May 11, 2007
Posts: 3
Dear Struts users,

when i try to sava my data after editing, the action is calling twice from that JSP where i am giving that, we are getting duplicate values in the database. pls give me the solution for this.
sathish kumar
Ranch Hand

Joined: Feb 14, 2007
Posts: 47
Are you using a Image or gif file when you submit data? As well struts has a token mechanism that you can use to avoid duplicate submits. Check this URL out.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Are you using JavaScript to do the submit? If so, make sure you do not call a JavaScript submit from an <html:submit> tag. Something like the following will cause a double submit:
<html:submit property="save" value="save" onklick="document.myform.submit();" />

Consultant, Sima Solutions
I agree. Here's the link:
subject: Pls give reply as immediate as possible
It's not a secret anymore!