Struts面试:如何强制重新加载ActionMapping(struts.xml)

2014-11-10 21:45:06 · 作者: · 浏览: 28

通常情况下,如果WAR包重新部署的话Action Mapping是会自动重新加载的,如果没有的话可以试试以下两种方法:设置reload属性为true或者销毁配置


设置reload为true: struts.properties


struts.configuration.xml.reload = true


销毁配置


String execute()


{


com.opensymphony.xwork.config.ConfigurationManager.destroyConfiguration();


}