Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old July 8th, 2008, 02:41 PM
Newbie
 
Join Date: Jul 2008
Posts: 1
Default JDBCRealms.... Ugh...

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.JDBCRealm" debug="0"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/****************"
connectionName="*********"
connectionPassword="********"
userTable="tcuser" userNameCol="tcuser_name" userCredCol="password"
userRoleTable="tcuser" roleNameCol="role_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>Administrator</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_check is not available.
Reply
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles