Mantis - Resin
Viewing Issue Advanced Details
4081 major always 06-16-10 04:06 01-13-11 16:30
olson  
ferg  
normal  
closed 4.0.7  
unable to reproduce  
none    
none 4.0.15  
0004081: servlet url pattern doesnt deal with wildcards correctly
I have a spring app, in my web.xml below you will see i have a filter and a servlet mapping which deals with all patterns with a file extension *.html, the problem is the url pattern is dealing with everything regardless whether it has .html in it and the filter which deals with the rest is being overriden.

this worked fine in 4.03 but now seems to be an issue in 4.06/4.07

<web-app id="WebApp_9" 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"> [^]

    <display-name>do-it Website</display-name>

    <filter>
        <filter-name>WebAlias</filter-name>
        <filter-class>se.solutions.webalias.WebAliasFilter</filter-class>
        <init-param>
            <param-name>ExcludedExtensions</param-name>
            <param-value>.gif,.jpg,.png</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>WebAlias</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:/config/spring/doit-website-config.xml</param-value>
    </context-param>

    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:/config/spring/doit-website-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>

</web-app>
server/13ff

Servlet dispatching performs as normal with this configuration.

Turning the logging on to finer will show how Resin has dispatched a URL. So you can use that logging to see what's happening here.

Notes
(0004702)
alex   
08-04-10 12:44   
This should be fixed with 4.0.9. Please confirm problem with 4.0.9.