通常情况下,如果WAR包重新部署的话Action Mapping是会自动重新加载的,如果没有的话可以试试一下两种方法:设置reload属性为true或者销毁配置。
①设置reload为true:struts.properties
struts.configuration.xml.reload = true
②销毁配置:
String execute() {
com.opensymphony.xwork.config.ConfigurationManager.destroyConfiguration();
return SUCCESS;
}