• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

login in to a mysql database

 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so this is the error from ex.getMessage()

com.mysql.jdbc.Driver

thats all it says??
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok got past that error

here is the new one
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic