#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Gainesville, Florida
    Posts
    4
    Rep Power
    0

    Tomcat/Mysql JDBC problem


    Hello,

    I am trying to utilize Mysql user and user_roles tables for basic authentication to access a protected resource (JSP).

    Site Application: ATACS
    Site url: www.kurtforrester.com
    Actual path: /home/kurtco/www/atacs/jsp/player.jsp


    The following is the realm from the server.xml file

    <Realm className="org.apache.catalina.realm.JDBCRealm"

    debug="99"

    driverName="org.gjt.mm.mysql.Driver"
    connectionURL="jdbc:mysql://www.kurtforrester.com/atacs?user=root;password="

    userTable="atacs.USERS" userNameCol="user_name"

    userCredCol="user_pass"

    userRoleTable="atacs.USER_ROLES"

    roleNameCol="role_name" />


    QUESTIONS:

    Since Mysql allows for multiple databases ... and I am using the atacs database ... I prefaced the USERS table with atacs.USERS to reference particular database and the table within. Is that correct?

    Do you see any problems with this Realm?



    POSSIBLE RELATED ISSUE: I am getting an error when I stop TOMCAT. Not when I start it ... only when I stop it. THe following is the error:

    * Stopping Tomcat...
    Catalina.stop: java.net.ConnectException: Connection refused
    java.net.ConnectException: Connection refused

    Could this be a cause or partial cause?

    Any help would be appreciated

    Kurt Forrester
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Kurt I am not clear on what your actual question is. Are you inquiring about the error message?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Gainesville, Florida
    Posts
    4
    Rep Power
    0
    Hello Victor,

    Sorry my last post wasn't clear.

    There are actually 3 questions that I have:

    1) Is the Realm correct for the information I gave?

    2) Is it necessary to preface the mysql table name with the database name (ie atacs.USERS)?

    3) Could the Tomcat shutdown error be involved in the security constraint being ignored?

    Thank you for looking at this.

    Kurt Forrester

IMN logo majestic logo threadwatch logo seochat tools logo