JavaScud | Forum | JIRA | Blog |
  Dashboard > WebWork2文档中文化计划 > ... > FAQ > Can I break up my large XWork.xml file into smaller pieces
  WebWork2文档中文化计划 Log In View a printable version of the current page.  
  Can I break up my large XWork.xml file into smaller pieces
Added by scud, last edited by scud on Mar 30, 2006  (view change)
Labels: 
(None)

Sure, that's what the <include> element is for. Most xwork.xml files
already have one:

<xwork>
    <include file="webwork-default.xml"/>
    <include file="config-browser.xml"/>
    <package name="default" extends="webwork-default">
....
    </package>
    <include file="other.xml"/>
</xwork>

This tells it to load the webwork-default.xml from the webwork jar file
to get all of those interceptor and result definitions.

You can put your own <include> in your xwork.xml interchangeably with
<package> elements... They will be loaded in the same order as it reads
from top to bottom and adds things as it reads them.

@see com.opensymphony.xwork.config.ConfigurationManager
@see com.opensymphony.xwork.config.Configuration
@see com.opensymphony.xwork.config.impl.DefaultConfiguration
@see com.opensymphony.xwork.config.ConfigurationProvider
@see com.opensymphony.xwork.config.providers.XmlConfigurationProvider

Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators