tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mykola Paliyenko" <mpaliye...@gmail.com>
Subject Filters do not apply after redirect to the url that serving by Servlet
Date Wed, 03 Oct 2007 15:17:00 GMT
Hi all,
Do not know if this a problem with Tomcat or with Servlet 2.4 spec
I have a FilterA that redirects from /news to the /mvc/news.html
Then I have a DispatcherServelt that mapped to the /mvc/*
And a FilterB that mapped to *.html for both REQUEST and REDIRECT methods
like this
    <filter-mapping>
        <filter-name>filterB</filter-name>
        <url-pattern>*.html</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
FilterB does not apply during processing

After adding
    <filter-mapping>
        <filter-name>filterB</filter-name>
        <url-pattern>/mvc</url-pattern>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
It works like intended. I understand that Mapping for URL does not apply
when I forward on URL that matching some servlet, very strange but this
workaround proves it

I'm using Tomcat 5.5.9 under java 5

Please suggest whether it is a bug or a standard behavior, as for me it is a
bug

Thanks in advance
Mykola

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message