tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McDermid, Ian" <Imcder...@metiom.com.au>
Subject Using the /amin context in tomcat
Date Wed, 14 Feb 2001 02:42:46 GMT
Hi,

I have setup postgresql on my RH6.2 machine. Apache and mod_jk are working
with all the jsp and servlet examples.

I have set up a database called authority with the following attributes:

Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

authority=# \d
       List of relations
    Name    | Type  |  Owner
------------+-------+----------
 roles      | table | postgres
 user_roles | table | postgres
 users      | table | postgres
(3 rows)

authority=# select * from users;
 user_name | user_pass
-----------+-----------
 tomcat    | tomcat
 user1     | tomcat
 user2     | tomcat
 user3     | tomcat
 admin     | password
(5 rows)
 
authority=# select * from user_roles;
 user_name | role_name
-----------+------------
 user1     | tomcatRole
 tomcat    | tomcatRole
 user2     | otherRole
 tomcat    | otherRole
 admin     | tomcatRole
 admin     | otherRole
(6 rows)
 
authority=# select * from roles;
 role_name
------------
 tomcatRole
 otherRole
(2 rows)
 
authority=#     

When I try to use the admin pages I get the following messages:

ot@eLaptop conf]# 2001-02-14 03:27:51 - ContextManager: JDBCRealm:
Authentication successful for user admin
2001-02-14 03:27:51 - ContextManager: JDBCRealm: Auth ok, user=admin
2001-02-14 03:27:51 - ContextManager: JDBCRealm: Controled access for admin
R( /admin + /contextAdmin/contextAdmin.jsp + null) Ct
(jsp(org.apache.jasper.servlet.JspServlet/null) )
2001-02-14 03:27:51 - ContextManager: JDBCRealm: Auth ok, first
role=otherRole
2001-02-14 03:27:51 - ContextManager: JDBCRealm: UnAuthorized admin 

server.xml has the following entries:

<RequestInterceptor
            className="org.apache.tomcat.request.JDBCRealm"
            debug="99"
            driverName="org.postgresql.Driver"
 
connectionURL="jdbc:postgresql://localhost/authority?user=postgres;password=
password"
            userTable="users" userNameCol="user_name"
userCredCol="user_pass"
            userRoleTable="user_roles" roleNameCol="role_name"
        />  
Can anyone point me in the right direction

Ian



Mime
View raw message