Sylvain Wallez wrote:

Upayavira wrote:

Sylvain Wallez wrote:

<snip/>

Using "servlet-debug" allows to connect the Eclipse debugger to the running Jetty if needed. It also allows to do code hotswap on the running server (I had some problems hotswapping code produced by the JDK's javac).



How do you get the howswap to work? How does it show that code has been swapped? I've done everything you've suggested, and I can run Jetty and debug, but I have to restart Jetty whenever I recompile classes.



Hotswap is only possible when you modify the code while the program is stopped at a breakpoint. I don't know what's the magic behind it, but often the new modified code replaces the old one and the program continues with the new one. Eclipse shows a warning when hotswap isn't possible.

Ahh. Hotswap when at a breakpoint. I'll give it a go. Thanks.


This is not the same as servlet context reloading that may happen when the contents of WEB-INF/classes is modified. Tomcat does this, but I don't know about Jetty. It's implemented in the servlet engine by regularly scanning the contents of WEB-INF/classes and WEB-INF/lib (the "normal" servlet classpath), which means it won't detect changes in build/eclipse/classes.

Thanks for clarifying. Jetty doesn't do this kind of hotswapping AFAIK.


Upayavira

Reply via email to