To allow hot refresh, class references in your servlet and JSP code must be resolved by the EAServer custom class loader. Class instances loaded by the system class loader cannot be refreshed. Class instances loaded by the custom class loader cannot be assigned to references loaded by the system class loader, or vice-versa.
Nearly all references are resolved by the custom loader. The exceptions are references made with class loader calls with an explicit reference to the system class loader or another custom class loader. The following class references are all resolved by the custom class loader when they occur in servlet code:
Classes referenced by import statements and declarations.
Classes loaded dynamically using Class.forName(String). For example:
obj = Class.forName("com.foo.MyClass");
Classes loaded by explicitly calling the java.lang.ClassLoader associated with the servlet instance, which can be retrieved with this code (this refers to the servlet instance):
ClassLoader loader = this.getClassLoader();
When possible, rewrite code that uses the system class loader to use the servlet class loader. The system class loader cannot load classes from the Web application WEB-INF/classes or WEB-INF/lib directories unless you add these locations to the server BOOTCLASSPATH and CLASSPATH environment variables.