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

struts.xml include not loading in dependant jar files

    XMLWordPrintableJSON

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));
      }
      }
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: