指定多个配置文件<include file="***.xml"></include>
struts.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <include file="helloword.xml"></include> <constant name="struts.enable.DynamicMethodInvocation" value="false"></constant> </struts>
helloword.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <package name="default" namespace="/" extends="struts-default"> <action name="helloword_*" method="{1}" class="com.action.HelloWord"> <result>/result.jsp</result> <result name="add">/{1}.jsp</result> <result name="update">/{1}.jsp</result> </action> </package> </struts>