File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Using Realms for access controll with multiple roles
Tor Henning Post
Joined: Nov 14, 2003
Oct 05, 2006 05:06:00
I have a Webapp where i have pages ment for users and pages ment for administrators. Is there a way i can configure
realms to perform access controll on pages based on roles in the same webapp.
e.g i want too have an admin page and only users with the role admin can access this page. all other pages can be accessed by users with role user.
So far i can only figure out how to specify one set of resources.
<security-constraint> <web-resource-collection> <web-resource-name>test1</web-resource-name> <url-pattern>admin.jsp</url-pattern> </web-resource-collection> <auth-constraint> <role-name>ADMIN</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>login</realm-name> </login-config> <security-role> <description>system administrators</description> <role-name>ADMIN</role-name> </security-role> <security-role> <description>User</description> <role-name>USER</role-name> </security-role>
I agree. Here's the link:
subject: Using Realms for access controll with multiple roles
Tomcat authentication and RACF
Tomcat Password Protection
access control with realm db
Tomcat BASIC Authentication Problem.
Form Authentication not working
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015