Greetings folks,
I'm trying to get JDBCRealms working presently. I want to use Tomcat's security to be able to login to this program I am writing and depending on the role of the user, only show them a specific portion of the program or allow them to edit certain info. I have looked on the net for some help on JDBCRealms but it's really far and few between. I have the tomcat documentation and I have an O'Reilly book on tomcat as well. I cannot get my hands around the realm idea. Can anyone provide some assistance?
Here is what I have in my server xml file for the realm:
<Realm className="org. apache.catalina .realm.JDBCReal m" debug="0"
driverName="com .mysql.jdbc.Dri ver"
connectionURL=" jdbc:mysql://localhost:3306/*************** *"
connectionName= "*********"
connectionPassw ord="********"
userTable="tcus er" userNameCol="tc user_name" userCredCol="pa ssword"
userRoleTable=" tcuser" roleNameCol="ro le_name" />
In my database I have a single table in there called tcuser which has user_name, password, and role_name fields. I don't believe that this should be a problem. is there anything that I am missing? Obviously there is, but I cannot figure it out.
Thanks in advance for any information anyone can provide.
- Regards,
Josh
Here is a snippet of the web.xml file:
<security-constraint>
<web-resource-collection>
<web-resource-name>********</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Administra tor</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>
It is telling me that the j_security_chec k is not available.
I'm trying to get JDBCRealms working presently. I want to use Tomcat's security to be able to login to this program I am writing and depending on the role of the user, only show them a specific portion of the program or allow them to edit certain info. I have looked on the net for some help on JDBCRealms but it's really far and few between. I have the tomcat documentation and I have an O'Reilly book on tomcat as well. I cannot get my hands around the realm idea. Can anyone provide some assistance?
Here is what I have in my server xml file for the realm:
<Realm className="org. apache.catalina .realm.JDBCReal m" debug="0"
driverName="com .mysql.jdbc.Dri ver"
connectionURL=" jdbc:mysql://localhost:3306/*************** *"
connectionName= "*********"
connectionPassw ord="********"
userTable="tcus er" userNameCol="tc user_name" userCredCol="pa ssword"
userRoleTable=" tcuser" roleNameCol="ro le_name" />
In my database I have a single table in there called tcuser which has user_name, password, and role_name fields. I don't believe that this should be a problem. is there anything that I am missing? Obviously there is, but I cannot figure it out.
Thanks in advance for any information anyone can provide.
- Regards,
Josh
Here is a snippet of the web.xml file:
<security-constraint>
<web-resource-collection>
<web-resource-name>********</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Administra tor</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>
It is telling me that the j_security_chec k is not available.