I set the scope parameter in the server.xml host section like this:
<Realm className="org.apache.catalina.realm.JDBCRealm" driverName="org.gjt.mm.mysql.Driver" connectionURL="jdbc:mysql://localhost:3306/test" connectionName="test" connectionPassword="test" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="user_role" />
Also in web.xml:
<security-role> <role-name>ADMIN</role-name> </security-role> <security-constraint> <web-resource-collection> <web-resource-name>critical</web-resource-name> <url-pattern>/admin/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>ADMIN</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.jsp</form-login-page> <form-error-page>/error.jsp</form-error-page> </form-login-config> </login-config>
And I have a database installed. However, when login.jsp is called, even I entered the correct password, I was redirected to error.jsp
I want to know if there is a way to find what is wrong during the process. Can I do this in Eclipse or any other tips that might solve the problem?
source share