problem with tomcat JDBC realm , i can not login and all configuration are correct

2006-09-09 Thread Legolas Woodland
Hi
Thank you for reading my post
i have problem with tomcat JDBC realm
I defined a jdbc realm in server.xml also i configured my application to
use Realms
but it never login into system ,it always send me to login_error page
instead of logging in to the syste.
I should say that when i creaete my own realm in server.xml ,i can not
login into admin console anymore.
are these two relevant ?
should i comment or uncomment more stuff in server.xml ?
how an application knows which realm it should use ?

another question that i have is about users / users_role / roles tables
should i create all these tables ?my users allways has one role , so i
create one table and
it contains also role column , i mapped these in server.xml .
can it be a problem for tomcat ? is it manedatory to use 3 tables ?

I attached my web.xml section that is related to security and also
server.xml section that is related to security and realms

I should say that i double check JDBC driver to be in place , double
check connection url ...


thank you very much.



---web.xml begin-
 

all
*.jsp


manager
user


NONE



FORM

/login.html
/login_error.html



manager


user


--server.xml---
  

  
   
  
  

  

  


  


  




---Database table structure---
  CREATE TABLE "HR"."USERS"
   ("NAME" VARCHAR2(32 CHAR),
"USER_ID" NUMBER,
"LASTNAME" VARCHAR2(32 CHAR),
"USERNAME" VARCHAR2(32 CHAR),
"PASSWORD" VARCHAR2(32 CHAR),
"ROLE_NAME" VARCHAR2(128 CHAR),
 CONSTRAINT "USERS_PK" PRIMARY KEY ("USER_ID") ENABLE
   ) ;
 



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



Re: problem with tomcat JDBC realm , i can not login and all configuration are correct

2006-09-09 Thread Hassan Schroeder

On 9/9/06, Legolas Woodland <[EMAIL PROTECTED]> wrote:


I should say that i double check JDBC driver to be in place , double
check connection url ...


"double check" as in, create a simple JSP or servlet that uses that
information to successfully access that table in the DB?


  userTable="users" userNameCol="username"
  userCredCol="password"
  userRoleTable="users" roleNameCol="role_name" />


At least in my -- case-sensitive -- environment, "users" != "USERS",
"username" != "USERNAME", etc. :-)


  CREATE TABLE "HR"."USERS"
   ("NAME" VARCHAR2(32 CHAR),
"USER_ID" NUMBER,
"LASTNAME" VARCHAR2(32 CHAR),
"USERNAME" VARCHAR2(32 CHAR), ...


And have you looked at your logs?

HTH,
--
Hassan Schroeder  [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]