Why do we need to restart Tomcat every time we edit a Servlet class

后端 未结 1 1263
悲&欢浪女
悲&欢浪女 2020-12-12 05:59

While we modify a user-defined Servlet class, we need to Restart the Apache Tomcat Server. but Whenever we modify a JSP file, we need NOT Restart.

Please anyone te

相关标签:
1条回答
  • 2020-12-12 06:16

    It's because Tomcat doesn't support hot code replacement. If you're developing in an IDE like Eclipse, then you could use among others the JRebel plugin to achieve this. As of now (May 2019), JRebel has still no free alternatives (primarily because this is really non-trivial).

    There are however servers which support hot code replacement out the box, such as WildFly and Payara. For them JRebel is not needed when you edit existing methods. These servers are out the box capable of performing hot code replacement via JVM hot-swap feature. JRebel is then only needed when you want to add new classes/methods and get them to deploy instantly.

    0 讨论(0)
提交回复
热议问题