mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-3950 solves problem when there are two Convention based application deployed to JBoss 4.x
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1424375 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+6
-5
@@ -401,18 +401,19 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
}
|
||||
|
||||
private List<URL> readUrls() throws IOException {
|
||||
List<URL> list = buildUrlSet().getUrls();
|
||||
List<URL> resourceUrls = new ArrayList<URL>();
|
||||
// Usually the "classes" dir.
|
||||
ArrayList<URL> classesList = Collections.list(getClassLoaderInterface().getResources(""));
|
||||
for (URL url : classesList) {
|
||||
list.addAll(fileManager.getAllPhysicalUrls(url));
|
||||
resourceUrls.addAll(fileManager.getAllPhysicalUrls(url));
|
||||
}
|
||||
return list;
|
||||
return buildUrlSet(resourceUrls).getUrls();
|
||||
}
|
||||
|
||||
private UrlSet buildUrlSet() throws IOException {
|
||||
private UrlSet buildUrlSet(List<URL> resourceUrls) throws IOException {
|
||||
ClassLoaderInterface classLoaderInterface = getClassLoaderInterface();
|
||||
UrlSet urlSet = new UrlSet(classLoaderInterface, this.fileProtocols);
|
||||
UrlSet urlSet = new UrlSet(resourceUrls);
|
||||
urlSet.include(new UrlSet(classLoaderInterface, this.fileProtocols));
|
||||
|
||||
//excluding the urls found by the parent class loader is desired, but fails in JBoss (all urls are removed)
|
||||
if (excludeParentClassLoader) {
|
||||
|
||||
Reference in New Issue
Block a user