K
kenp21
First off, I am using Tomcat 5.5.12
I have gone through much trouble trying to get this to work, however, I
have configured my JNDI JDBC datasource. Tested and worked. Now I am
attempting to configure a datasourcerealm. I stuck the following into
the tomcat/conf/server.xml file
<Realm className="org.apach.catalina.realm.DataSourceRealm"
dataSourceName="java:/comp/env/jdbc/myDB"
userTable="users"
userNameCol="userId"
userCredCol="password"
userRoleTable="users"
roleColName="role"
/>
I updated my web.xml file in my application (WEB-INF/web.xml) with the
following
<security-constraint>
<web-resource-collection>
<web-resource-name>Admin tool page</web-resource-name>
<url-patter>adminTool.jsp</url-pattern>
</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>/logon.jsp</form-login-page>
<form-error-page>/error.jsp</form-login-page>
</form-login-config>
</login-config>
then i created the logon.jsp which a form whose method is post and
action is j_security_check.
Tomcat starts with no errors, but as soon as I type in a user name and
password that should be in the database and push submit I receive a 404
error stating /myApplication/j_security_check is not available. I
understand that a 404 error means the server (tomcat in this case)
could not locate the specified resource. However, I thought the
j_security_check is in the java servlet specification and that tomcat
is a certified java servlet container? Shouldn't the j_security_check
servlet be available?
I have gone through much trouble trying to get this to work, however, I
have configured my JNDI JDBC datasource. Tested and worked. Now I am
attempting to configure a datasourcerealm. I stuck the following into
the tomcat/conf/server.xml file
<Realm className="org.apach.catalina.realm.DataSourceRealm"
dataSourceName="java:/comp/env/jdbc/myDB"
userTable="users"
userNameCol="userId"
userCredCol="password"
userRoleTable="users"
roleColName="role"
/>
I updated my web.xml file in my application (WEB-INF/web.xml) with the
following
<security-constraint>
<web-resource-collection>
<web-resource-name>Admin tool page</web-resource-name>
<url-patter>adminTool.jsp</url-pattern>
</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>/logon.jsp</form-login-page>
<form-error-page>/error.jsp</form-login-page>
</form-login-config>
</login-config>
then i created the logon.jsp which a form whose method is post and
action is j_security_check.
Tomcat starts with no errors, but as soon as I type in a user name and
password that should be in the database and push submit I receive a 404
error stating /myApplication/j_security_check is not available. I
understand that a 404 error means the server (tomcat in this case)
could not locate the specified resource. However, I thought the
j_security_check is in the java servlet specification and that tomcat
is a certified java servlet container? Shouldn't the j_security_check
servlet be available?