Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBCRealms, j_security_check, and the programmer who loves it not.....

27 views
Skip to first unread message

Josh

unread,
Jul 8, 2008, 10:36:48 AM7/8/08
to
Hey folks,

My name is Josh (obviously). I am having some real trouble setting up
realms and using the j_security_check. I'm spinning my wheels on this
issue, and I am coming up short each and every time. I have read and
re-read the tomcat documentation and I also have a book on tomcat.
They pretty much say the same thing word for word. (Thanks
O'Reilly). In my form, on submission I am calling the
j_security_check. Do I have to put a specific .jar into tomcat
6's .lib folder or is it already there? I keep getting
"j_security_check is not available". I've dug around the sun forums a
bit but I didn't really find anything of usefulness. If this is not
working correctly, should I try re-installing tomcat to get it
working?

Here is a snippet of my web.xml file:

<welcome-file-list>
<welcome-file>Login.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Katiana</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
<role-name>user</role-name>
<role-name>manager</role-name>
<role-name>trainer</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Training</realm-name>
<form-login-config>
<form-login-page>/Login.jsp</form-login-page>
<form-error-page>/Login.jsp</form-error-page>
</form-login-config>
</login-config>

With this I am redirecting all invalid login's back to the Login.jsp
page

The server.xml snippet needed to setup the realm:

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="0"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/*******"
connectionName="*******"
connectionPassword="********"
userTable="tcuser" userNameCol="tcuser_name"
userCredCol="password"
userRoleTable="tcrole" roleNameCol="tcrole_name" />

Any clue you can give me would be greatly appreciated. I'm really
getting frustrated with tomcat. Thank you in advance.

- Josh

0 new messages