wood burning stoves 2.0*
The moose likes JDBC and the fly likes login in to a mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "login in to a mysql database" Watch "login in to a mysql database" New topic
Author

login in to a mysql database

Joseph Swager
Ranch Hand

Joined: Feb 04, 2010
Posts: 41

I can not for the life of me figure why this servlet doesnt pull the info i want from the database. It looks right to me I only should pull one result and compair it to the same info passed from the post.
Please someone explain what im doing wrong. im making simple outputs and im always getting the output of both else statements



"Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do." -- Steve Jobs
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2500
    
    8

You are hiding the error message. Print your exception, and you will know what is wrong.

And:

don't use newInstance() when loading the driver.
Class.forName("com.mysql.jdbc.Driver").newInstance();


OCUP UML fundamental and ITIL foundation
youtube channel
Joseph Swager
Ranch Hand

Joined: Feb 04, 2010
Posts: 41

ok so this is the error from ex.getMessage()

com.mysql.jdbc.Driver

thats all it says??
Joseph Swager
Ranch Hand

Joined: Feb 04, 2010
Posts: 41

ok got past that error

here is the new one
Joseph Swager
Ranch Hand

Joined: Feb 04, 2010
Posts: 41

I feel so stupid it was something very simple.



instead of password which is what the post passes it should have been



works like a charm

Thank you Jan Cumps for getting me looking in the right direction.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: login in to a mysql database