Force Tomcat to always get latest version of class

D

Dave

When I make a modification to Java classes I have instantiated in my JSP
pages, it doesn't seem to take effect for a while. If I stop and start the
Tomcat service it seems to force the server to use the latest version of the
class. I presume it's some sort of caching that causes it to use the older
versions.

Is there any way to force Tomcat to use the latest compiled version of
classes?
 
S

Simon Brooke

Dave said:
When I make a modification to Java classes I have instantiated in my JSP
pages, it doesn't seem to take effect for a while. If I stop and start
the Tomcat service it seems to force the server to use the latest version
of the class. I presume it's some sort of caching that causes it to use
the older versions.

Is there any way to force Tomcat to use the latest compiled version of
classes?

http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
 
C

Chris Riesbeck

Dave said:
When I make a modification to Java classes I have instantiated in my JSP
pages, it doesn't seem to take effect for a while. If I stop and start the
Tomcat service it seems to force the server to use the latest version of the
class. I presume it's some sort of caching that causes it to use the older
versions.

Is there any way to force Tomcat to use the latest compiled version of
classes?
define a <Context> for your webapp with reloadable true

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


You used to have to modify server.xml but now it can be a separate file
in your webapp directory

http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html#A word on Contexts
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top