Commit 25ffdb0
Property to tell to Tomcat to map JARs in WEB-INF/lib or WEB-INF/classes (#422)
Use case : Chapter Ordering in https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html
`Since both resources are PostResources, it might be expected that D:\Projects\external\classes will be searched for classes before D:\Projects\lib\library1.jar. However, by adding the JAR using a FileResourceSet, the JAR is mapped to /WEB-INF/lib and will be processed at application start along with the other JARs in /WEB-INF/lib. The classes from the JAR file will be added to the ClassResources which means they will be searched before the classes from D:\Projects\external\classes. If the desired behaviour is that D:\Projects\external\classes is searched before D:\Projects\lib\library1.jar then a slightly different configuration is required:
<Resources>
<PostResources base="D:\Projects\external\classes"
className="org.apache.catalina.webresources.DirResourceSet"
webAppMount="/WEB-INF/classes"/>
<PostResources base="D:\Projects\lib\library1.jar"
className="org.apache.catalina.webresources.JarResourceSet"
webAppMount="/WEB-INF/classes"/>
</Resources>
In short, the JAR file should be added as a JarResourceSet mapped to /WEB-INF/classes rather than using a FileResourceSet mapped to /WEB-INF/lib.`
Co-authored-by: Hélios GILLES <h-gilles@efluid.fr>1 parent 66400f0 commit 25ffdb0
File tree
2 files changed
+17
-0
lines changed- core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat
2 files changed
+17
-0
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
| |||
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
220 | 231 | | |
221 | 232 | | |
222 | 233 | | |
223 | 234 | | |
| 235 | + | |
224 | 236 | | |
225 | 237 | | |
226 | 238 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
0 commit comments