• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

isUserInRole() doubt

 
Ranch Hand
Posts: 115
Firefox Browser Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
(servlet)


In the DD:
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sumedha,

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic