Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001634 [Resin] major always 03-06-07 14:18 04-03-07 15:02
Reporter dpasek View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.0
Summary 0001634: No filter chain for named dispatcher
Description Using a named dispatcher for forwarding a request to a servlet no filter chain is applied to the called servlet.
Example (see attached web app):
Servlet1: DispatcherServlet
Servlet2: RenderServlet
Filter1 is mapped to RenderServlet (FORWARD dispatcher)

web.xml:

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee [^] http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> [^]
    <filter>
        <filter-name>MessageFilter</filter-name>
        <filter-class>de.gisdesign.resinbug.MessageFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>MessageFilter</filter-name>
        <servlet-name>RenderServlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <servlet>
        <description>Servlet for dispatching to the render servlet using a named dispatcher</description>
        <servlet-name>DispatcherServlet</servlet-name>
        <servlet-class>de.gisdesign.resinbug.DispatcherServlet</servlet-class>
    </servlet>
    <servlet>
        <description>Render servlet for rendering the secret message injected by the filter</description>
        <servlet-name>RenderServlet</servlet-name>
        <servlet-class>de.gisdesign.resinbug.RenderServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>DispatcherServlet</servlet-name>
        <url-pattern>/dispatch</url-pattern>
    </servlet-mapping>
</web-app>

DispatcherServlet forwards the request to RenderServlet using a named dispatcher but the filter for RenderServlet is never called.

In my understanding of the servlet specification filters must always be applied, completely independent of the type of the dispatcher.

Tomcat and Jetty perform the filter correctly.
Additional Information
Attached Files  resin-filter.war [^] (4,974 bytes) 03-06-07 14:18
 resin-filter-src.tar.gz [^] (17,448 bytes) 03-06-07 14:22

- Relationships

- Notes
(0001806)
ferg
04-03-07 15:02

server/1739
 

- Issue History
Date Modified Username Field Change
03-06-07 14:18 dpasek New Issue
03-06-07 14:18 dpasek File Added: resin-filter.war
03-06-07 14:22 dpasek File Added: resin-filter-src.tar.gz
03-06-07 14:22 dpasek Issue Monitored: dpasek
04-03-07 15:02 ferg Note Added: 0001806
04-03-07 15:02 ferg Assigned To  => ferg
04-03-07 15:02 ferg Status new => closed
04-03-07 15:02 ferg Resolution open => fixed
04-03-07 15:02 ferg Fixed in Version  => 3.1.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker