facebook

problems with authentication using j_security_check

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #250135 Reply

    sorinc
    Member

    Hello!

    I’m developing a web project using struts and hibernate and Tomcat. I tried to enable Container Security using a jdbc realm as desribed in http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JDBCRealm (I’ve also restarted the server)

    In web.xml I’ve added:

    
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/error.jsp</form-error-page>
    </form-login-config>
    </login-config>login-config>
    

    The login.jsp page looks like (I’ve deleted all html or bean struts tags):

    
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    
    <html>
        <head>
            <link rel="stylesheet" type="text/css" href="styles/styles.css"/>
        </head>
        
        <body>
            
            <table class="main" align="center">
            
                <tr>
                    <td height="10"></td>
                </tr>
                
                <form  method="post" action="j_security_check" >
                <tr>
                    <th> Username </th>
                    
                    <td>
                        <input type="text" name="j_username">
                    </td>
                </tr>
                
                <tr>
                    <th> Password </th>
                    <td>
                        <input type="password" name="j_password">
                    </td>
                </tr>
                
                <tr height="5">
                </tr>
                
                <tr align="center">
                    <td align="center" colspan="2">
                        <input type="submit" class="btn" value="Submit">     <input type="reset" class="btn">
                    </td>
                </tr>
                </form>
    
                <tr>
                    <td height="10"></td>
                </tr>
                
            </table>
            
            </body>
    </html>
    

    When I press the Submit button after I’ve completed the credentials I receive the following error:

    The requested resource (/Reporting/j_security_check) is not available.

    Does anyone have any ideea that could help me?

    Thank you very much.
    With best regards,
    Sorin

    #250146

    Haris Peco
    Member

    Sorin,

    It is better that you see example application (for example in server/webapps/admin) for example security usage
    This application user MemoryRealm, but it is same with JDBC

    Best

    #250171

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: problems with authentication using j_security_check

You must be logged in to post in the forum log in