Hello Tiago,

I can't tell you where you can find documentation
concerning "roles". But I have taken a look on struts
roles on my own. So I'll write down what I know and
maybe you get a hint.

The struts config dtd defines an attribute "roles" for
the "action" element. The "roles" attribute is
optional and may contain a comma-delimited list of
security role names. These role names are loaded to
the ActionMapping of the related action class during
initialization of the ActionServlet and Actions (if
you want to know exactly what is done when take a look
at the init method of the ActionServlet's source).
When an Action's execute method is called an
ActionMapping object is passed. ActionMapping inherits
the property roles from ActionConfig which is
populated with the role names from the
struts-config.xml during initialization. Within your
action you may access your security role names from
the mapping. For convenience there is a method
getRoleNames so you get the role names within an
array. 

Hope that helps.

I posted a thread last week regarding this issue. But
I didn't get a helpful answer. I wanted to define a
custom struts config dtd to extend the struts config
with an element "security constraint". My problem is
still that I don't know how to configure the digester
using custom rule sets so my sub-class of action
mapping gets populated with my custom tag. Maybe you
have an idea or anyone who reads this thread.

Sincerely yours

Sebastian


 --- Tiago Henrique Costa Rodrigues Alves
<[EMAIL PROTECTED]> schrieb: > Where can
I find Struts Roles documentation?
> 
> Tiago Henrique C. R. Alves
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to