This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pls give reply as immediate as possible" Watch "Pls give reply as immediate as possible" New topic
Author

Pls give reply as immediate as possible

pasuparthi mokshavathi
Greenhorn

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 data.so, 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.

http://www.javaworld.com/javaworld/javatips/jw-javatip136.html
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();" />


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pls give reply as immediate as possible
 
Similar Threads
Difference between hashCode() and equals()
C++ software development leader - Microsoft Shanghai China
Can you run the gabage collector whenever you want?
arrays