• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pls give reply as immediate as possible

 
pasuparthi mokshavathi
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();" />
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic