Many Thanks, M- ********************************************************************* This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you.
----- Original Message ----- From: "Niall Pemberton" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org>; "Martin Gainty" <[EMAIL PROTECTED]> Sent: Thursday, September 28, 2006 12:00 AM Subject: Re: multiple module 403 forward > Either by configuring the module or action for the exception in the > struts-config.xml > > To configure it for the module... > > <global-exceptions> > <exception > type="org.apache.struts.chain.commands.UnauthorizedActionException" > path="/myUnauthorizedAction" /> > </global-exceptions> > > ...or for a specific Action... > > <action path="/fooAction" type"..."> > <exception > type="org.apache.struts.chain.commands.UnauthorizedActionException" > path="/myUnauthorizedAction" /> > </global-exceptions> > > Niall > > On 9/28/06, Martin Gainty <[EMAIL PROTECTED]> wrote: >> >> How does one redirect or forward to *alternate action* using >> UnauthorizedActionException >> Thanks for the info, >> Martin-- >> >> ----- Original Message ----- >> From: "Niall Pemberton" <[EMAIL PROTECTED]> >> To: "Struts Users Mailing List" <user@struts.apache.org> >> Sent: Wednesday, September 27, 2006 9:01 PM >> Subject: Re: multiple module 403 forward >> >> >> > On 9/27/06, Derrick Koes <[EMAIL PROTECTED]> wrote: >> >> How can I configure my web app so that each module will forward a 403 >> >> error to a different page? >> > >> > In the Struts 1.2.x series there is nothing to do what you want - the >> > request processor just uses HttpServletResponse.sendError(403, "User >> > is not authorized to access action x") - so you can only configure the >> > webapp as a whole through the web.xml. For 404's you can configure an >> > "unknown" action for each module - but theres nothing equivalent for >> > authorization errors. To do this you would need to create your own >> > custom RequestProcessor implementation and override the processRoles() >> > method. >> > >> > In the Struts 1.3.x series the equivalent Command is the >> > "AuthorizeAction" which works differently to Struts 1.2.x - instead of >> > using HttpServletResponse's sendError() method it throws an >> > "UnauthorizedActionException" - so you can configure an exception >> > handler on a per-module basis to show different pages. >> > >> > Niall >> > >> >> Thanks, >> >> Derrick >> > >> > --------------------------------------------------------------------- >> > 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] > >