wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes isUserInRole() doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "isUserInRole() doubt" Watch "isUserInRole() doubt" New topic

isUserInRole() doubt

sumedha rao
Ranch Hand

Joined: Nov 26, 2010
Posts: 115

Hello ranchers,this question is related to the web-app security chapter:
If there are two(or more) role-names defined in the DD inside the <security-role>element,to which role-name will the user be mapped?

For example:

In the DD:

bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256

I think you are confused here. <security-role> is where you declare your roles in your web-app.

< security-role> < role-name>Admin</role-name> </ security-role>
< security-role><role-name>Member</role-name> < /security-role>
< security-role><role-name>Guest</role-name> </ security-role>

From your <security-role-ref> you will map what ever you use in your isUserInRole("") to one of the roles mentioned above. If you closely look at the tags from the page you are citing you will find a </serlet> closing tag.

Hope this helps.
I agree. Here's the link: http://aspose.com/file-tools
subject: isUserInRole() doubt
Similar Threads
<security-role-ref> comes under which tag??
Programmatic Security
isUserInRole() doubt
The Order of the security-role Element in DTD
Hi, some questions on web app security....