Most often, the Action Mappings will be automatically reloaded if the WAR is redeployed. If you are finding that the xwork configuration is not reloaded when you redeploy your war. Is there a way to tell webwork to unload its configuration when the context is destroyed.
Try to call
Code Block |
---|
com.opensymphony.xwork.config.ConfigurationManager.destroyConfiguration() |
...
not, there are two things you can try: Setting the reload property to true and destroying the configuration.
Setting Reload to True
Code Block | ||
---|---|---|
| ||
### Configuration reloading
### This will cause the configuration to reload struts.xml when it is changed
struts.configuration.xml.reload=true
|
Reloading the Configuration
Create a utility Action that calls reload
.
Code Block | ||
---|---|---|
| ||
// ...
String execute() {
Dispatcher.getIntance().getConfigurationManager().reload();
return SUCCESS;
}
|
Invoking reload
will force Struts to reload the configuration.