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:
1.
Install and Setup The Database
2.
Install the JDBC Driver
3.
Setup the Database Tables
4.
Test The JDBC Driver and Connection
5.
Deploy and Test the Web Application
6.
Prepare the Necessary Login and Error HTML Files
7.
Edit Tomcat's server.xml To Enable JDBC Realm
8.
Edit the Web Application's web.xml To Require Authentication
9.
Start Tomcat and Test