Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

datas storing twice from servlet to mysql database  RSS feed

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am storing some datas like username,logintime,logout time from my servlet program to mysql database.but when i login once ,the datas are getting stored twice.I cant find why this problem occurs?
my code follows:


Thanks.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we see the login form? Try to cut it down to just he important bits.
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.Here is the login form


 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thought so, your form is submitting twice. Your javascript should return true after validation rather than calling submit() again
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!