Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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

Code Block
titleactionstruts.properties
### Configuration reloading
### This will cause the configuration to reload xworkstruts.xml when it is changed
actionstruts.configuration.xml.reload=true

...

Reloading the Configuration

Create a utility Action that calls reload.

Code Block
titleMyUtilityAction.java

// ...
String execute() {
  Dispatcher.getIntance().getConfigurationManager().reload
com.opensymphony.xwork.config.ConfigurationManager.destroyConfiguration();
  return SUCCESS;
}

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