WebSpiders Interweb Pvt. Ltd.
Please Login or Register

Knowledgebase

 Tomcat won't recognize when I update (recompile) my classes, what do I do ?
Solution 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.



Article Details
Article ID: 680
Created On: 21 Oct 2005 06:36 AM

 This answer was helpful  This answer was not helpful

 Back

Help Desk Software By Kayako SupportSuite v3.70.02
Language:

Quick Navigation

Client Login

Email

Password

Remember Me

Search