Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Login/Registration system in JSP

  • 20-02-2006 3:59pm
    #1
    Registered Users, Registered Users 2 Posts: 463 ✭✭


    I'm currently trying to setup a website with a login system.
    The site is being done completely in JSP.
    I'm using MYSql as the database.

    I want users to be able register their details and then login with their chosen username and password to access information from the database specific to their account.

    I'm using Apache Tomcat as our server.
    There's a tutorial here for creating a similar system under Geronimo & Derby SQL, but I'm not sure if it's merely a case of altering this to work with MySql:
    http://www-128.ibm.com/developerworks/opensource/library/os-ag-logreg2/#fig2

    I changed:
    driver = (Driver) ([B]com.ibm.db2.jcc.DB2Driver.class[/B]).newInstance();
                } catch(Exception e) {
                    throw new IllegalArgumentException("Unable to load, instantiate, or register driver "+
                                                       driver+": "+e.getMessage());
                }
                
                try {
                    Properties prop = new Properties();
                    prop.put("user", "system");
                    prop.put("password", "manager");
                    Connection conn = driver.connect("jdbc:derby:net://localhost:1527/SystemDatabase;", prop);
    
    to:
    driver = (Driver) ([B]com.mysql.jdbc.Driver[/B]).newInstance();
                } catch(Exception e) {
                    throw new IllegalArgumentException("Unable to load, instantiate, or register driver "+
                                                       driver+": "+e.getMessage());
                }
                
                try {
                    Properties prop = new Properties();
                    prop.put("user", "actualdbusername");
                    prop.put("password", "actualdbpassword");
                    Connection conn = driver.connect("jdbc:mysql://localhost/jspod;", prop);
    
    Am I barking up the wrong tree?
    Thanks


Advertisement