File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confirmation required about <security-role> element.

 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a Web application, what is the usage of <!ELEMENT security-role (description?, role-name)>? If I don't declared the roles used in the web application, what is the impact?

Just to inform the container, that these are the roles used in the application?

Thanks!
 
Parth Twari
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to inform the container, that these are the roles used in the application?


yes

if you dont tell container about roles used in application then the things such as isUserinRole and <auth-constraint><role-name>
won't recognize the roles.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Parth, Don't the server get them from the Database, if it used?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2168
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't the server get them from the Database, if it used?

When designing a web-app you will have to think of the different actors involved in your use-cases. These groups of users you will have to make available to the container by using the <security-role> element.

How you map explicit users to a role-name is typically done by storing that information (user and roles) in a database. This is however not necessary, in tomcat, you can define them in a simple property file (tomcat-users.xml)

Regards,
Frits
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic