struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diego Manilla Suárez <diego.mani...@xeridia.com>
Subject Re: Send a 403 response
Date Wed, 01 Jun 2005 06:42:19 GMT
Diego Manilla Suárez wrote:

> Hi! I need to implement some kind of security inside of an Action. 
> When the user doesn't meet certain criteria, I must send him to the 
> "forbidden" page. Right now I'm doing this:
>
> if (!allowed) {
>    response.sendError(HttpServletResponse.SC_FORBIDDEN);
>    return null;
> }
>
> The problem is that the user is sent to the default error page of 
> Tomcat, instead of the 403 page defined in web.xml. Are the lines 
> above wrong?
>
> Thanks in advance.


Ok, I found the problem: there was a filter that wasn't forwarding the 
error.

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


Mime
View raw message