2012/9/29 sohsoh <boudali.souh...@gmail.com>:
> Hello Tomcatters,
>
> I am beginner in development, I wanted to do the user authentication, I am I
> followed a tutorial for it to the letter, but in the final step I fell into
> a problem that I did not arrive for a week of web search to solve it
> -- after login he goes search on the database and when it's a fake login or
> passe  he derige me to the error page<form-error-page> but when the password
> and login are correct i get HTTP 403 and that is my problem it does not
> Derige me to my desired page
>

It is hard to understand your writing.

1. Can you describe your actions and the behaviour that you observe
step-by-step, chronologically?

http://www.catb.org/~esr/faqs/smart-questions.html

2. What pages are you accessing? What are their URLs?
3. What is the actual behaviour that you see?
4. What behaviour did you expect? What do you want?

5. What is in the logs? What is in Tomcat's access log?


> brief  all I've done is
>>> in web.xml
>
>   <security-constraint>
>        <display-name>AdminConstraint</display-name>
>        <web-resource-collection>
>            <web-resource-name>Admin</web-resource-name>
>            <description>Only for administrators</description>
>            <url-pattern>/pages/protected/admin/*</url-pattern>
>        </web-resource-collection>
>        <auth-constraint>
>            <role-name>ADMIN</role-name>
>            </auth-constraint>
>    </security-constraint>
>     <login-config>
>     <auth-method>FORM</auth-method>
>     <form-login-config>
>       <form-login-page>/pages/public/login.xhtml</form-login-page>
>       <form-error-page>/pages/public/loginError.xhtml</form-error-page>
>     </form-login-config>
>   </login-config>
>    <security-role>
>        <role-name>ADMIN</role-name>
>    </security-role>
>
>>> in server.xml
>
> <Context path="/myapp" docBase="myapp" >
> <Realm className="org.apache.catalina.realm.JDBCRealm"
> driverName="com.mysql.jdbc.Driver"
> connectionURL="jdbc:mysql://localhost:3306/mabase" userTable="users"
> userNameCol="name" userCredCol="pass" userRoleTable="user_roles"
> connectionName="tomcat" connectionPassword="TomcatPassword"
> roleNameCol="role_name" debug="99" />
> </Context>
>
>
> *where is the error?? is what I need to add anything else??*
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to