Mantis - Resin
Viewing Issue Advanced Details
4411 minor always 02-25-11 16:50 03-02-11 16:08
ccwf  
ferg  
normal  
closed 4.0.15  
fixed  
none    
none 4.0.16  
0004411: Wildcarded ServletContext Resource Issues with Spring
Spring ServletContext resources using wildcards do not work with Resin 4.0.15. They worked in 4.0.14.
This issue is similar to old bug 0002659, although this problem is with ServletContext resources.

The problem is that for wildcarded resources, Spring passes the directory to ServletContext.getResource(String). Resin 4.0.15's ServletContextImpl implementation checks if the requested resource is a file and returns null for directories. Spring's ServletContextResource.getURL method (called from PathMatchingResourcePatternResolver) then throws an exception because it got a null back from ServletContext.getResource(String).

Resin 4.0.14's ServletContextImpl only checked that the requested resource exists and did not require it to be a file, so it did not have this interoperability problem with Spring.

Here's a typical error produced when using Resin 4.0.15 with Spring and wilcarded resources:

[11-02-25 16:13:20.359] {main} org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [/WEB-INF/context/*.xml]; nested exception is java.io.FileNotFoundException: ServletContext resource [/WEB-INF/context/]
cannot be resolved to URL because it does not exist

Notes
(0005086)
ccwf   
02-25-11 16:58   
Forgot to note that I confirmed this problem with Resin 4.0.15 with Spring 3.0.5 & Spring 3.0.3. Resin 4.0.14 with Spring 3.0.3 does not have the problem.
(0005104)
ferg   
03-02-11 16:08   
server/1t14