RE: [jetty-user] RE: Filter Question
Tony Thompson <Tony.Thompson <at> stone-ware.com>
2008-10-02 14:37:23 GMT
That was it. I had it dispatching for "all" and my filter was being
called twice for the request.
Thanks for the help.
Tony
-----Original Message-----
From: Athena Yao [mailto:athena <at> webtide.com]
Sent: Thursday, October 02, 2008 7:48 AM
To: user <at> jetty.codehaus.org
Subject: Re: [jetty-user] RE: Filter Question
Tom,
Not familiar with Jetty 5, but I'm seeing this behavior as well on Jetty
6 when I call response.sendError() from a filter, and that filter
applies to the error page.
What I'm seeing is that the request cycles through:
error-throwing filter -> ErrorPageErrorHandler.handle -> dispatch ->
ServletHandler.handle -> chain.doFilter ( ->
ErrorPageErrorHandler.handle...), changing the stored value of the error
page.
If you break the cycle, then the error page you set in your web.xml will
show up. Try making sure that your filter is not being applied to the
path/servlet for the error page.
Cheers,
Athena
On Wed, 2008-10-01 at 15:50 -0400, Tony Thompson wrote:
> Anyone willing to offer a suggestion to resolve this?
>
>
>
> I am not sure if this is really a Jetty question or not but I thought
> someone may have an answer for this. For a given web application, I
> have an error page configured in the web.xml for a 403 error code. In
> this web application I also have a servlet filter configured that
> could send a 403 response. When the filter sends a 403 error
> response, Jetty will not return the error page. The servlet filter is
> my code so, do I need to do something differently in the filter to
> make it return the 403 error page? Or is there an issue in Jetty that
> is preventing the error page from being returned (I am still using
> Jetty 5)?
>
> Any pointers on a way to debug this would be appreciated.
> Tony
>
> This message (and any associated files) is intended only for the use
> of the individual or entity to which it is addressed and may contain
> information that is confidential, subject to copyright or constitutes
> a trade secret. If you are not the intended recipient you are hereby
> notified that any dissemination, copying or distribution of this
> message, or files associated with this message, is strictly
> prohibited. If you have received this message in error, please notify
> us immediately by replying to the message and deleting it from your
> computer. Messages sent to and from Stoneware, Inc.
> may be monitored.
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email