Bug 63137

Summary: Ignored second (and next) resources mapped in webAppMount="/WEB-INF/classes" using DirResourceSet
Product: Tomcat 8 Reporter: Marcin Gołębski <marcin.golebski>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: 8.5.x-trunk   
Target Milestone: ----   
Hardware: PC   
OS: Linux   
Attachments: the patch fixing the issue of several resources registerd to /WEB-INF/classes

Description Marcin Gołębski 2019-01-31 22:30:37 UTC
Created attachment 36414 [details]
the patch fixing the issue of several resources registerd to /WEB-INF/classes

When we want to map more than one directory into /WEB-INF/classes resource, there is problem, only first one is taken into account by org.apache.catalina.loader.WebappClassLoaderBase.

Context example:

<Context path="/webapp">
    <PostResources base="/path/to/ledge-components/target/classes" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes"/>
    <PostResources base="/path/to/some-api/target/classes" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes"/>  

The patch attached fixes this issue.
Comment 1 Mark Thomas 2019-02-01 21:24:43 UTC
Thanks for the report and especially for the patch.

Fixed in:
- trunk for 9.0.15 onwards
- 8.5.x for 8.5.38 onwards