Main Hotswap Agent (HA) configuration file. You can create an empty file or start with commented content.
You need to put hotswap-agent.properties file into application runtime classpath. This means:
- maven: src/main/resources
- webapp: WEB-INF/classes
- ant, plain java: check your classpath
The hotswap-agent.properties file is loaded per classloader, e.g. each webapp may have seperate configuration.
The most important configuration property is ‘extraClasspath’. Set comma seperated list of directories with additional java .class files. These directories will be used prior standard classpath.
Watch resources is similar to extraClasspath, however it will use a resource from this path only after it is modified after application
startup. Sometimes it is not possible to point extraClasspath to your i.e. src/main/resources, because there are multiple replacements
of resources in a building step (maven filtering resource option). This setting will leave i.e. src/target/classes as default source for resources,
but after the resource is modified in src/main/resources, the new changed resource is served instead.
Add a directory prior to webapp path (load webapp resources). Load web application resources (such as HTML, JSP, CSS, …) from this directory prior to default processing.
This property is currently supported only for Jetty and Tomcat servlet containers.
Multi-module maven project
Parts of your project are built into .jar files, which are finally assembled usually into WEB-INF/lib directory of the webapp. Without HA you have to rebuild the module and restart the application.
You may start the server at any location from .war file and point web resources, class files and resource files to your development directory.
Usually you will launch debugging session from your IDE and use standard hotswap feature. If you do not want to use debugging session
for some reason or if you want to enable hotswap at runtime environment, set
This feature may be used even on production environment to apply a hot patch.