Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

j_security_check users from MySQL (or a similar authentication method)?

843840Aug 23 2007 — edited Aug 24 2007
After trying to write an authentication system using sessions (and failing), I did some research and found out about j_security_check.

After searching for ways to use this and coming across several forum posts that never seemed to accomplish anything close to what I'm attempting to do, the closest method for doing this would only get user data from the tomcat-users.xml file.
Normally, this would work, but I'm aiming for a way to allow users to register, and a SQL database seems like the best way to do this. (plus, I don't want to mess around with file permissions and such)

Is reading the user data from MySQL possible? If not, is there a decent way to accomplish something close to this (that works with Tomcat 6- all the guides I read seemed to refer to SJSAS-specific features)?

Thanks!


Also, here's the code I'm currently using from web.xml if that helps at all:
<login-config>
        <auth-method>FORM</auth-method>
        <realm-name>CMS Login</realm-name>
        <form-login-config>
            <form-login-page>/index.jsp?page=pages/login/login.jspf</form-login-page>
            <form-error-page>/index.jsp?page=pages/login/error.jspf</form-error-page>
        </form-login-config>
    </login-config>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2007
Added on Aug 23 2007
2 comments
186 views