File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes JDBCRealm class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JDBCRealm class" Watch "JDBCRealm class" New topic

JDBCRealm class

Pepe Cardozo

Joined: Dec 26, 2006
Posts: 1
I'm using Tomcat 5.5 and want to implement the authentication through jdbcrealm, i also want to use the MD5 as digest; my problem is that i cannot locate the JDBCRealm class, i looked up in the catalina.jar but couldn't find it.
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
This type of realm involves storing the credentials of your users (i.e. their usernames, passwords and assigned roles) inside a database. Tomcat will then need to be configured to use this database and the JDBC realm option inside the configuration files will need to be enabled.

Setting up a JDBC Realm involves the following steps:


Install and Setup The Database

Install the JDBC Driver

Setup the Database Tables

Test The JDBC Driver and Connection

Deploy and Test the Web Application

Prepare the Necessary Login and Error HTML Files

Edit Tomcat's server.xml To Enable JDBC Realm

Edit the Web Application's web.xml To Require Authentication

Start Tomcat and Test

<a href="" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="" target="_blank" rel="nofollow">Java Weblog</a> | <a href="" target="_blank" rel="nofollow">Computing Articles</a>
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
It doesn't really matter whether you know where the class is - Tomcat knows If you're really curious, it's in catalina-optional.jar, and its documentation is here.
I agree. Here's the link:
subject: JDBCRealm class
It's not a secret anymore!