aspose file tools
The moose likes JSP and the fly likes Creating users and controlling access based upon roles Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Creating users and controlling access based upon roles" Watch "Creating users and controlling access based upon roles" New topic
Author

Creating users and controlling access based upon roles

Praveen Kumar Singh
Greenhorn

Joined: Oct 05, 2009
Posts: 12
hi,

i am creating a page where i need to give user access to some pages on the basic of his role.

this page can be common for all user or may be there will be different pages on the basic of his role.

Please help me on this & tell me how can i do this.

Praveen Kumar Singh
Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2926
    
  15

Praveen Kumar Singh wrote:hi,

i am creating a page where i need to give user access to some pages on the basic of his role.

this page can be common for all user or may be there will be different pages on the basic of his role.

Please help me on this & tell me how can i do this.

Praveen Kumar Singh


One approach which immediately came to my mind:
You can have "Roles" associated with each user. You could store the User details in a Session and based on the User's role- You can give access to the page the user is eligible to view.
That way In the same page you could give access to different controls based on the User's role- Like the Moderation of Forum posts.

Am not aware of other ways, other members will be able to add more to this.

Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating users and controlling access based upon roles
 
Similar Threads
how to bypass j2ee security roles
Can I have j_security_check in two login.jsp
Redirect to the requested page failed using form-based authentication
Using Realms for access controll with multiple roles
access control with realm db