Apache Struts 2 Documentation > Home > FAQs > How can we force the Action Mappings (struts.xml) to reload
Added by victorsosa, last edited by Don Brown on Jul 12, 2008  (view change)

Most often, the Action Mappings will be automatically reloaded if the WAR is redeployed. If not, there are two things you can try: Setting the reload property to true and destroying the configuration.

Setting Reload to True

struts.properties
### Configuration reloading
### This will cause the configuration to reload struts.xml when it is changed
struts.configuration.xml.reload=true

Destroying the Configuration

Create a utility Action that calls destroyConfiguration.

MyUtilityAction.java
// ...
String execute() {
  com.opensymphony.xwork.config.ConfigurationManager.destroyConfiguration();
  return SUCCESS;
}

Invoking destryConfiguration should destroy the current configuration and force the configuration to be reloaded on next request (which you might want to make yourself!).