Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3961

struts.xml include not loading in dependant jar files

    Details

      Description

      In "struts.xml" when I include "struts/*.xml" which packaged in "WEB-INF/lib/sys.jar",but didn't load the include files. When I put include files in folder "WEB-INF/cleasses/struts/",it works.

      <include file="struts/*.xml" />
      

      com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#loadConfigurationFiles(String fileName, Element includeElement)

      if ("include".equals(nodeName)) {
      String includeFileName = child.getAttribute("file");
      if (includeFileName.indexOf('*') != -1) {
      	// handleWildCardIncludes(includeFileName, docs, child);
      	ClassPathFinder wildcardFinder = new ClassPathFinder();
      	wildcardFinder.setPattern(includeFileName);
      	Vector<String> wildcardMatches = wildcardFinder.findMatches();
      	for (String match : wildcardMatches) {
      		finalDocs.addAll(loadConfigurationFiles(match, child));
      	}
      } else {
      	finalDocs.addAll(loadConfigurationFiles(includeFileName, child));
      }
      }
      

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Struts-JDK7-master #576 (See https://builds.apache.org/job/Struts-JDK7-master/576/)
          WW-3787 WW-3961 Allows include config files from JARs (lukaszlenart: rev 98979423a164e264d1291ac34dc9a16759173aea)

          • (edit) core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-wildcard-include.xml
          • (edit) core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderWildCardIncludeTest.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #576 (See https://builds.apache.org/job/Struts-JDK7-master/576/ ) WW-3787 WW-3961 Allows include config files from JARs (lukaszlenart: rev 98979423a164e264d1291ac34dc9a16759173aea) (edit) core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-wildcard-include.xml (edit) core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderWildCardIncludeTest.java (edit) core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 98979423a164e264d1291ac34dc9a16759173aea in struts's branch refs/heads/master from Lukasz Lenart
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9897942 ]

          WW-3787 WW-3961 Allows include config files from JARs

          Show
          jira-bot ASF subversion and git services added a comment - Commit 98979423a164e264d1291ac34dc9a16759173aea in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9897942 ] WW-3787 WW-3961 Allows include config files from JARs

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              yuanhuiwu yuanhuiwu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development