• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Authorisation-Doubt

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell ne the difference between the security-role and auth-constraint tag. Both seems to be same. why we need security-role tag instead of auth-constraint.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinod,

The <role-name> tag is over loaded in the web.xml.

<auth-constraint> is used inside one of the <security-contraint> tag in the web.xml where as <security-role> is global there is only one occurance) to the web.xml.

when you invoke isUserInRole() method it looks for <security-role> tag VIA <security-role-ref> tag inside the <servlet> tag.

I hope I am able to clarify your doubt. Others Let me know if I am wrong in explaining.
 
vinod balaji
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Siddharth,
from your answer i understand that the security-role is used only to map the container specific role-names to servlet specific role-names and it is nothing to do with authentication. I believe iam right, correct me if iam wrong.

Thanks once again
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic