Could anyone please explain me why I need to restart the Tomcat server, once a .class
file has been loaded into the server?
Asked
Active
Viewed 1,450 times
0

Alberto Solano
- 7,972
- 3
- 38
- 61

Venkatarama reddy
- 81
- 8
2 Answers
3
Default behavior is you have to restart. when you restart the tomcat then and then only the class loader runs again and the changes effects.
How ever you can configure
it with reloadable
attribute.
reloadable=true
Note: Think twice while enabling this, as a little performance pain on tomcat and effects the existing requests on the fly(regarding the changes). Be careful.
Here you can find the Manager
and see the heading Reload An Existing Application

Suresh Atta
- 120,458
- 37
- 198
- 307
-
where should I find reloadable attribute attribute in tomcat. – Venkatarama reddy Jan 04 '14 at 10:54
-
@Venkataramareddy updated with links. – Suresh Atta Jan 04 '14 at 11:06
-
when jsp files are loaded tomcat checks the timestamp of already available jsp and the newly added jsp file,but when we load classes why should we restart tomcat?why it is not comparing timestamp ,just like it is doing for jsp. – Venkatarama reddy Jan 04 '14 at 12:17
0
Because the Apache Tomcat WebServer doesn't have the ability to recognize the changes made in the files and restart itself, unless this feature (reloadable attribute) is set to true
:
reloadable=true
In this way, the server monitors the directories where the .class
files are stored. If a change is made, it will restart itself.

Alberto Solano
- 7,972
- 3
- 38
- 61