wood burning stoves
The moose likes Servlets and the fly likes Verify/deny a new user to MySQL via Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Verify/deny a new user to MySQL via Servlet" Watch "Verify/deny a new user to MySQL via Servlet" New topic

Verify/deny a new user to MySQL via Servlet

Marvin Harrison

Joined: Mar 03, 2005
Posts: 20
The user is correctly denied if user enters the first "dbemails" value.

However, if it is a new user, the users are "squarely compounded/added" into MySQL.

Eg: user2, user3,user3, (user4, user4, user4, user4), (user5x8), (user6x16)
I have no clue what is going on here, thank you.

The pastebins are better formatted, but posted code here anyway.
Thank you

Here is the jsp, also viewable at:

**********************************end JSP

and the SERVLET, also viewable at:


[Edit by Dave - code tags added]
[ September 25, 2005: Message edited by: David O'Meara ]
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

1, 2, 4, 8, 16

It looks like each time you read the values from the database, you are reading everything and re-inserting. Hence you double the number of times each user exists.

Have a look at the way you use your while(rs.next()), consider adding a 'where' clause to the query and using an 'if(rs.next())' instead.

I have to admit I just browsed the code and didn't read it all, it's a bit too much to digest.

I agree. Here's the link: http://aspose.com/file-tools
subject: Verify/deny a new user to MySQL via Servlet
It's not a secret anymore!