This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
From issue #9272: creating a module with an internal servlet, then reloading it in test mode repeatedly (running it each time), ensuring that changes to the code are honored, and using -J-Dorg.netbeans.core.modules=0 to check that each time the class loader for the module is reclaimed reliably at some point after it is uninstalled. I have similar module somewhere. It might be worth to create a test from it.
A test would be nice. BTW for manual verification try running openide/build.xml:examples-explservlet-reload.