0

Could anyone please explain me why I need to restart the Tomcat server, once a .class file has been loaded into the server?

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

2 Answers2

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
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