views:

39

answers:

0

Hi I have written something using the j_security_check. Yet i keep having to login. My web.xml file looks like this: ` FORM /login.jsp /loginFailed.jsp

 <security-role>
    <role-name>admin</role-name>
</security-role>
<security-role>
    <role-name>user</role-name>
</security-role>



<security-constraint>
    <web-resource-collection>
        <web-resource-name>users</web-resource-name>
        <url-pattern>/normal/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>user</role-name>
        <role-name>admin</role-name>
    </auth-constraint>
</security-constraint>

<security-constraint>
    <web-resource-collection>
        <web-resource-name>users</web-resource-name>
        <url-pattern>/restricted/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>admin</role-name>
    </auth-constraint>
</security-constraint> `

I can get it to work if i only have a small number of jsps in the restricted in the directory yet i can't if there is about 5. Thanks in advance Dean