A popular strategy is "divide and conquer". The framework lets you apply "divide and conquer" to configuration files using the include element.
Code Block | ||||
---|---|---|---|---|
| ||||
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd"> <xwork> <include file="struts-default.xml"/> <include file="Home-config.xml"/> <include file="Hello-config.xml"/> <include file="Simple-config.xml"/> <include file="Pojo-config.xml"/> </xwork> |
Each included file must be in the same format as struts.xml
, including the doctype
. The include files can be placed anywhere on the classpath.
In a large-team environment, the include files can be used to organize different modules of the application that are being developed by different team members.