On Wed, 20 Feb 2002, Claude Montpetit wrote:

> Date: Wed, 20 Feb 2002 22:01:39 -0500
> From: Claude Montpetit <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Error page servlet and Filter invocation
>
>
>
> I created a servlet that handles errors. This servlet gets executed when
> specific errors occur, as defined in my web.xml file.
>
> The problem: I mapped a filter to this servlet and the filter NEVER
> execute when the servlet is invoked by an error (following a sendError
> call). But if I call the error servlet directly (no error, no
> sendError), the filter executes normally.
>
> Has anyone come across this behavior?
>

Yes ... it's what the servlet spec requires.

Filters are only invoked on the *original* request, before the service()
method of your servlet is called.  They are *not* executed in front of
error servlets, or (for that matter) servlets that are invoked via a
request dispatcher.

> Claude
>

Craig McClanahan


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to