You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jarnot Voytek Contr AU HQ/SC <Vo...@MAXWELL.AF.MIL> on 2002/10/29 17:25:40 UTC

Container Managed Authentication and roles attribute on action

I love the fact that when using (as we are) container managed
authentication, I can specify roles on a per action basis in
struts-config.xml.  My problem is that when a user is not authorized, I get
a 400 Bad Request response to the browser.  Is it possible to configure a
[page/action/forward] that would be invoked instead?

I hope what I'm after is clear - I just want a custom page to inform the
user that they've overstepped their bounds.

Thanks,
Voytek Jarnot


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Container Managed Authentication and roles attribute on action

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 29 Oct 2002, Jarnot Voytek Contr AU HQ/SC wrote:

> Date: Tue, 29 Oct 2002 10:25:40 -0600
> From: Jarnot Voytek Contr AU HQ/SC <Vo...@MAXWELL.AF.MIL>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: "Struts Users Mailing List (E-mail)" <st...@jakarta.apache.org>
> Subject: Container Managed Authentication and roles attribute on action
>
> I love the fact that when using (as we are) container managed
> authentication, I can specify roles on a per action basis in
> struts-config.xml.  My problem is that when a user is not authorized, I get
> a 400 Bad Request response to the browser.  Is it possible to configure a
> [page/action/forward] that would be invoked instead?
>

In your web.xml file, you can define the page that is used for any
particular status code (including 400).  Check out the <error-page>
directive.

> I hope what I'm after is clear - I just want a custom page to inform the
> user that they've overstepped their bounds.
>
> Thanks,
> Voytek Jarnot
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>