To set up Tomcat to use JNDIRealm, you will need to follow these steps:
1. Make sure your directory server is configured with a schema that matches the requirements listed above.
2. If required, configure a username and password for use by Tomcat, that has read only access to the information described above. (Tomcat will never attempt to modify this information.)
3. Place a copy of the JNDI driver you will be using (typically ldap.jar available with JNDI) inside the $CATALINA_HOME/server/lib directory (if you do not need it visible to web applications) or $CATALINA_HOME/common/lib (if it will be used both by Tomcat 5 and by your apps).
4. Set up a <Realm> element, as described below, in your $CATALINA_HOME/conf/server.xml file.
5. Restart Tomcat 5 if it is already running.