If I understand what you are doing correctly you can use the
security-constraint element in web.xml to define what URL patters require
authorization and which ones do not.

If you use JAAS, then you don't need to handle the redirecting as it will
forward it to the login page you specify (using the login-config element) if
the user requires authorization to access a specific URL.

Note also that you can have multiple security-constraint elements.  We use
two, the first locks everything down, i.e. every URI requires
authentication, and the second opens specific ones up that do not require
authentication.

-Adam

-----Original Message-----
From: Aladin Alaily [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 09 August 2006 08:26
To: user@struts.apache.org
Subject: Retrieving the <url-pattern> from web.xml

Hello,

I have a filter in which I check that the users are properly authenticated.

When the user needs to be redirected, I am able to retrieve the following:

1) context path (using the request)
2) action path (using the ActionConfig)

... but I cannot retrieve the url-pattern from web.xml!  I have looked at
the Util classes but can't seem to find anything.

Anyone have a clue?

Thanks.

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

Reply via email to