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]