Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes datas storing twice from servlet to mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "datas storing twice from servlet to mysql database" Watch "datas storing twice from servlet to mysql database" New topic
Author

datas storing twice from servlet to mysql database

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
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

Joined: Mar 06, 2001
Posts: 13459

Can we see the login form? Try to cut it down to just he important bits.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks.Here is the login form


David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Thought so, your form is submitting twice. Your javascript should return true after validation rather than calling submit() again
 
Consider Paul's rocket mass heater.
 
subject: datas storing twice from servlet to mysql database
 
Similar Threads
calling java inside a servlet
page refresh problem
cookies problem
Error on threads
how to upload xls file