//struts-config的代码
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources />
<form-beans>
<form-bean name="dynaLocaleForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="country" type="java.lang.String"></form-property>
<form-property name="language" type="java.lang.String"></form-property>
<form-property name="page" type="java.lang.String"></form-property>
</form-bean>
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<!-- 这里的success是默认的只,会自动跑到指定的页面,其实还可以在动态表单里面指定一个page属性,就会跑到page指定的页面去-->
<action path="/test" name="dynaLocaleForm" type="org.apache.struts.actions.LocaleAction">
<forward name="success" path="/success.jsp"></forward>
</action>
</action-mappings>
<message-resources key="goto" parameter="com.yourcompany.struts.ApplicationResources" />
</struts-config>
//jsp的代码,如果动态表单里指定了page就要加上
<a href="${pageContext.request.contextPath}/test.do?country=cn&language=zh"&page=/success.jsp>china</a>
<a href="${pageContext.request.contextPath}/test.do?country=us&language=en&page=/success.jsp">english</a>
//用于国际化的页面
<bean:message bundle="goto" key="name"/>