You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lyallex <ly...@gmail.com> on 2008/12/11 13:42:48 UTC

[S2] Displaying custom 403 Error Code page

Hi

I have the following configuration in web.xml

<error-page>
  	<error-code>403</error-code>
  	<location>/403Forbidden.jsp</location>
</error-page>


In my action

<action name="LoadInterventionRecords"
class="blah.blah.InterventionDelegate" method="loadInterventions">
        <interceptor-ref name="completeStack"/>
        <interceptor-ref name="roles">
   	    <param name="allowedRoles">intervener</param>
        </interceptor-ref>
	<result name="success">/secure/staff/intervener/manageInterventions.jsp</result>
	<result name="error">/friendlyError.jsp</result>
</action>

If I log in with intervener role then I can access the resource

If I log in with another role and try to access the InterventionDelegate
the roles interceptor returns a 403 Forbidden error code
However something doesn't pick up the fact that I have the error-page
defined in web.xml and I get the default Apache Tomcat/6.0.16 HTTP
Status 403 Error Code Page

How can I force my custom error code page to be displayed ?
I'm trying to find out if it's possible to configure the roles
interceptor in some way but I'm getting nowhere fast

Any help much appreciated

Many Thanks
lyallex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org