tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludwig Magnusson <lud...@mediatool.com>
Subject Re: Tomcat 6.0.35 filters not invoked for error-pages
Date Tue, 24 Apr 2012 09:31:02 GMT
Thanks for your reply.

First of all: I have solved the acutal problem caused by this in a more 
stable way.

But out of curiosity I tried your solution and it does not work either.
this is my setup:

<servlet>
    <servlet-name>myservlet</servlet-name>
    <servlet-class>mypackage.MyServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>myservlet</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

<filter-mapping>
    <filter-name>myfilter</filter-name>
    <servlet-name>myservlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

/Ludwig

-----Ursprungligt meddelande----- 
From: Christopher Schultz
Sent: Monday, April 23, 2012 4:05 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.35 filters not invoked for error-pages

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ludwig,

On 4/22/12 2:26 PM, Ludwig Magnusson wrote:
> Hello. I found some strange behavour in tomcat 6.0.35 when
> declaring error-pages in my web.xml. When tomcat picks up an error
> and redirects it to the location given by the <location> element in
> <error-page>, the filters that would have been invoked for that
> location are actually not invoked.
>
> I found an almost identical report in the bug database:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=49098 (the user
> had the same problem when using query strings in <location>).
> However, I do not use query strings in my locations and I still get
> the error.
>
> Is this a bug and is it known?

What does your web.xml look like?

The error page is probably treated as a FORWARD, and you'll have to
configure your filters to fire on FORWARD as well as REQUEST (the
default).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+VYaMACgkQ9CaO5/Lv0PD4cwCff6+JoDHqehqsEtTMU471Np1+
MicAoKYezgJgAQ+0EWP71UkDFRb41nBf
=/UDF
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message