This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am under the impression that settting the following parameter to true in the jrun-web.xml file would allow java files to be recompiled instantly upon saving. This would allow me to never have to restart the server while developing. However this is not happening for me. Does anyone use JRUN and have an Idea of what the problem could be?
< !-- reload & compile --> < !-- These values tell Jrun how to handle changes to Servlets --> < !-- reload=true means to reload the class if it has changed --> < !-- compile=true means recompile java file if it has changed --> < !-- This can be handy for development, but must be false for production -->
It's possible that the components of your application uses a different class loader than the J2EE-based components. In order to force the helper classes to be reloaded (allowing any changes to show up), you can do one of the following:
1. Restart the JRun server.
Restarting the JRun server will cause the helper class (and everything else) to reload, making the new/modified class file accessible. Since restarting a server can be time consuming and disruptive, an easiest solution to this problem is to:
2. "touch" the web.xml file of the web application.
Making and saving a minor modification to the web.xml file (or using the Unix "touch" command to update the file's modification date) will cause the entire application (including the modified helper class) to redeploy, without having to restart the server.