Hi,
I want to configure tomcat / my web application to use a JDBC realm for container managed security. I specified the realm inside tomcat's server.xml file like this:
<Realm className="org.apache.catalina.realm.JDBCRealm" driverName="net.sourceforge.jtds.jdbc.Driver" connectionURL="jdbc:jtds:sqlserver://hostname:1433/intranet;user=sa;password=sa04jT14;instance=instanceName" userTable="users" userNameCol="username" userCredCol="password" userRoleTable="roles" roleNameCol="role" />
I created the database and the tables. I created a login-page and added the following code to the web.xml:
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.xhtml</form-login-page>
<form-error-page>/login.xhtml</form-error-page>
</form-login-config>
</login-config>
But how does Tomcat know which realm he has to use for authentication? Do I have to add an element to the element? But what should be the value then?
Thanks in advance.