assuming your roles are declared, what does get |*getUserPrincipal
<
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getUserPrincipal%28%29>*()|
return.
Regards,
Venu
> Here's my web.xml
> <security-constraint>
> <web-resource-collection>
> <web-resource-name>Admin Pages</web-resource-name>
> <url-pattern>/view/*</url-pattern>
> </web-resource-collection>
> <auth-constraint>
> <role-name>admin</role-name>
> </auth-constraint>
> </security-constraint>
>
>
> <security-constraint>
> <web-resource-collection>
> <web-resource-name>All Pages</web-resource-name>
> <url-pattern>/*</url-pattern>
> </web-resource-collection>
> <auth-constraint>
> <role-name>user</role-name>
> <role-name>admin</role-name>
> </auth-constraint>
> </security-constraint>
>
> <login-config>
> <auth-method>FORM</auth-method>
> <realm-name>jdbc</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>
>
> Here's my sun-web.xml
> <security-role-mapping>
> <role-name>user</role-name>
> <group-name>user</group-name>
> </security-role-mapping>
> <security-role-mapping>
> <role-name>admin</role-name>
> <group-name>admin</group-name>
> </security-role-mapping>
>
>
>
> The security constraint is working too. I just can't get the roles
>
>