Good Morning Nenad

If you follow these instructions
http://www.onjava.com/pub/a/onjava/2001/07/24/tomcat.html?page=2
specifically.. populating with JDBCRealm these attributes must be populated

className The fully qualified name of the Realm attribute e.g. org.apache.catalina.realm.JDBCRealm driverName The specific driver used to connect to the DB e.g. org.gjt.mm.mysql.Driver connectionURL The URL referencing the DB containing the users e.g. jdbc:mysql://localhost/tomcatusers?user=test;password=test connectionName username to use when connecting to the DB (you can encode connectionName in the connectionURL) connectionPassword The password to use when connecting to the DB (you can encode connectionPassword in the connectionURL))
userTable                    DB table containing user credentials
userNameCol Name of Column to use when referencing username..best to call it 'user' userCredCol Name of column to use when referecning password .best to call it 'password' userRoleTable DB Table which contains mapping between userTable and roles and table containing possible user roles roleNameCol userRoleTable column name which specifies roles given to a user..best to call 'role'

HTH
Martin --

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- From: "Nenad Bosanac" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Sunday, June 04, 2006 10:20 AM
Subject: Can`t resolve JDBCRealm problem


Hi !
I try to implement JDBCRealm but witout success.
I read documentation and make all as it said in it,but
when i try to login in tomcat Manager i can't do it.
I put this code in server.xml:

<Realm
className="org.apache.catalina.realm.JDBCRealm"
       driverName="com.mysql.jdbc.Driver"

connectionURL="jdbc:mysql://localhost:3306/jdbcrealm"
       connectionName="root" connectionPassword=""
       userTable="users" userNameCol="user_name"
userCredCol="user_pass"
       userRoleTable="user_roles"
roleNameCol="role_name" />

also i have this in server.xml

<Realm
className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase"/>

I have database called jdbcrealm and to tables like
this in it

create table users (
 user_name         varchar(15) not null primary key,
 user_pass         varchar(15) not null
);

create table user_roles (
 user_name         varchar(15) not null,
 role_name         varchar(15) not null,
 primary key (user_name, role_name)
);

My MySQL databse username is root and i have no
password for MYSQL database.
I put mysql-connector-3.0.17.jar in
$CATALINA_HOME/server/lib and in
$CATALINA_HOME/common/lib.

I use 5.5.16 Tomcat.

I got this error when i try to connect to Manager:
--------------------------------------------
HTTP Status 403 - Access to the requested resource has
been denied
________________________________________
type Status report
message Access to the requested resource has been
denied
description Access to the specified resource (Access
to the requested resource has been denied) has been
forbidden.
----------------------------------------------------

What i am doing wrong?
Any help will be great ,thanks


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to