Description
To use this feature, follow these steps:
- Set "struts.devMode" to "true"
- Set "struts.class.reloading.watchList" to a comma separated list of directories, or jar files (absolute paths)
- Add this to web.xml:
<context-param>
<param-name>contextClass</param-name>
<param-value>org.apache.struts2.spring.ClassReloadingXMLWebApplicationContext</param-value>
</context-param>
*Add Apache Commons JCI FAM to the classpath. If you are using maven, add this to pom.xml:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jci-fam</artifactId>
<version>1.0</version>
</dependency>
Notes:
- Some spring classes were overwritten to avoid java class/constructor cache.
- This will only work when "devMode" is set to true, and should not be used in production environments as it will slow down the application.
- This feature is experimental
- When a directory is specified in "struts.class.reloading.watchList", its sub directories will also be watched