Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Login Servlet.

  1. #1
    New Coder
    Join Date
    Feb 2013
    Posts
    45
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Login Servlet.

    Hi

    Can anyone tell me whats involved with this question?

    Code:
    Create a servlet that will check a user name and password entered 
    into Logon Web Page for the Food Traders web site. If the user 
    name and password exist in the employees table, direct the user to 
    a Welcome page displaying the userís full name. The welcome page 
    should be a Java Server Page
    If the user name and password does not exist in the employees 
    table, direct the user back to the logon page.
    I have a mysql database running on localhost containing the employee table. I understand there will be an if statement creating a redirect but whats involved in connecting to the database, searching for the username / password and verifying.

    Im familiar with basic Java but SQL with Java is new to me. So far i have a HTML login page that posts to a loginservlet.java

    Thanks

  • #2
    New Coder
    Join Date
    Feb 2013
    Posts
    45
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Update : Ive connected to the database through Netbeans test with says connection successful.

    I have wrote a separate class called MySQLConnection and im not sure what to do next.

    Possibly create a method to query the database for the username and password verification?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •