Tomcat won't recognize when I update (recompile) my classes, what do I do ?

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
Was this answer helpful?

Related Articles

What do I need to do to put Flash on my website?

Flash is a client side feature - it runs on the user's computer, not on your web host. As long as...

How do I track how many hits my website gets?

Tracking on your site can be either done server-side or remotely. With server-side statistics,...

What are PHP, ASP, perl, etc?

These are all programming languages which are referred to by their acronyms.PHP - PHP: Hypertext...

How do I login to my domain's cPanel?

you can login to your cPanel by going to www.yourdomain.com/cpanel (yourdomain is...

Do I have to change my domain if I get a new host?

No. Provided that the domain is registered in your name (as it should be), you can simply update...

Powered by WHMCompleteSolution