struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3961) struts.xml include not loading in dependant jar files
Date Sat, 31 Dec 2016 11:08:58 GMT

    [ https://issues.apache.org/jira/browse/WW-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15789352#comment-15789352
] 

ASF subversion and git services commented on WW-3961:
-----------------------------------------------------

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

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


> struts.xml include not loading in dependant jar files
> -----------------------------------------------------
>
>                 Key: WW-3961
>                 URL: https://issues.apache.org/jira/browse/WW-3961
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: XML Configuration
>    Affects Versions: 2.3.4
>            Reporter: yuanhuiwu
>            Assignee: Lukasz Lenart
>              Labels: include, struts.xml
>             Fix For: 2.5.next
>
>
> 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.
> {code:xml}
> <include file="struts/*.xml" />
> {code}
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#loadConfigurationFiles(String
fileName, Element includeElement)
> {code:java}
> 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));
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message