On 29/12/2011 08:43, Jürgen Jakobitsch wrote:
> hi,
> 
> i have a custom 403 error page.
> on that page i'd like to display the securityConstraints that apply
> to the requested resource.
> 
> example :
> 
> i have a securityConstraint in my web.xml that says that only users with role 
> "X"
> are allowed to view resource "myPage".
> when someone tries to access "myPage" without being in the role "X", i'd like 
> to
> display "Role "X" is required to view "myPage""
> 
> is there a way to access the security constraints defined in web.xml from 
> within
> a jsp?

There is no Servlet API for this.

It might be possible to access the web.xml file (on the file system or
by JMX) and reparse it, but I would be cautious about doing this myself.

Seems like a lot of work for very little return.


p


> any pointer really appreciated
> wkr http://www.turnguard.com/turnguard
> 
> 


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to