File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes question about tomcat JDBC realm. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "question about tomcat JDBC realm." Watch "question about tomcat JDBC realm." New topic
Author

question about tomcat JDBC realm.

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Thank you for reading my post.
i have some question about jdbc realm in tomcat.
-can we have several realms ?
-how an application knows which realm to use?
-i add a new realm to tomcat but i could not enter the admin console anymore until i reinstall the tomcat and admin console.
-each user in my system has one role , can i use just one table for authentication ?
I mean i add a role_name column to users table and map its column in server.xml?
thanks
[ September 09, 2006: Message edited by: raminaa niilian ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41101
    
  45

-can we have several realms ?

Tomcat supports a single realm per web application. Different web apps can have different realms.

-how an application knows which realm to use?

That is configured with the <Realm> element in conf/server.xml, or the <Context> element for individual web apps. Check the Tomcat Realm documentation for details.

-i add a new realm to tomcat but i could not enter the admin console anymore until i reinstall the tomcat and admin console.

Could it be that the realm you configured does not include the username/password used for the Admin console?

-each user in my system has one role , can i use just one table for authentication ? I mean i add a role_name column to users table and map its column in server.xml?
I don't think so. The JDBC realm documentation says that three tables are required: users, roles, and user roles.
[ September 09, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: question about tomcat JDBC realm.
 
Similar Threads
can WebLogic 6.0 use a JDBC realm?
Problem understanding Security-Constraint
How to configure authentication without authorisation
Form based authentication / Realms
Can I use JDBC realm in WebLogic?