Not without parsing 'web.xml' yourself. "Doug Redd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Okay, that could work if I can get a list of which roles a resource requires. Is there a way to do a call like "getResourceRoles(resource)"?
-----Original Message----- From: Will Hartung [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 3:42 PM To: Tomcat Users List Subject: Re: Pre-authorize a link? > From: "Doug Redd" <[EMAIL PROTECTED]> > Sent: Thursday, March 06, 2003 3:08 PM > Subject: Pre-authorize a link? > Is there any way to make a call such as "authorize(user, resource)" > that returns a boolean to indicate if the user is authorized? I am > looking for a way to programmatically either include or exclude a link > on a page depending on whether the authenticated user is authorized to > access the link's destination. The basic method is to use Roles, and then use the Request.isUserInRole("ROLE") to determine whether a user is qualified to go to that link. I appreciate this isn't the complete answer you were looking for, as it would be nice to just throw the URL at the container and have IT figure it out, but the current Container Managed security is pretty darn basic and doesn't expose much functionality to the user. Regards, Will Hartung ([EMAIL PROTECTED]) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]