• Post Reply Bookmark Topic Watch Topic
  • New Topic

auth-constraint doubt

 
Reesha Ashok
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is it possible for a <security-constraint> tag to have more than one <auth-constraint> tag?
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

according to the DTD of the web.xml descriptor you can have only one (ore zero) <auth-constraint> element within a <security-constraint> tag. So principally you can turn on and off authorization per <security-constraint>. But you can have multiple <security-constraint> elements and inside <auth-constraint> there can be multiple <role-name> tags. That should usually be sufficient for all authorization needs.

Marco
 
Reesha Ashok
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marco..!!!
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!