I want to configure tomcat / my web application to use the JDBC scope for container-managed security. I specified the area in the tomcat server.xml file as follows:
<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 a database and tables. I created a login page and added the following code in 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 area he should use for authentication? Do I need to add an element to an element? But what then should be the value?
Thanks in advance.
c0d3x source
share