There is an easy way to solve the problem of getting their JSP pages or servlets to recognize changes they make to their Java classes, and it doesn't require a JVM or Tomcat restart. To force the JSP pages to recognize your class changes, execute the following command on the unix shell (via SSH):
find ~ -name "*.jsp" -exec touch {} ;
In case you don't know what that does, it touches every JSP file in your directory structure. This will force Tomcat to think the JSP page has been modified and it will recompile the JSP page next time it is accessed. And, in the process of doing this, Tomcat will use any updated and recompiled classes when the JSP page is next accessed.
So what you can do is add this command as a line in your build.xml (if you use ANT), or your makefile (if you use make), or you can just run it at the command line after a compile of your java classes. This should solve the classes not reloading problem.
If you are having this problem with a Servlet, you will need to restart your Tomcat instance using the Tomcat Manager or we will need to restart the Tomcat server if you don't have access to the Tomcat Manager.
- 1 Users Found This Useful
Related Articles
Powered by WHMCompleteSolution