aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: datas storing twice from servlet to mysql database
 
Similar Threads
Error on threads
page refresh problem
how to upload xls file
cookies problem
calling java inside a servlet