Bug 63137 - Ignored second (and next) resources mapped in webAppMount="/WEB-INF/classes" using DirResourceSet
Summary: Ignored second (and next) resources mapped in webAppMount="/WEB-INF/classes" ...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.x-trunk
Hardware: PC Linux
: P2 normal with 19 votes (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-31 22:30 UTC by Marcin Gołębski
Modified: 2019-02-01 21:24 UTC (History)
0 users



Attachments
the patch fixing the issue of several resources registerd to /WEB-INF/classes (1003 bytes, text/plain)
2019-01-31 22:30 UTC, Marcin Gołębski
Details

Note You need to log in before you can comment on or make changes to this bug.
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">
  <Resources>
    <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"/>  
  </Resources>
</Context>

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