Debug ServletContextListener.contextDestroyed() by setting the breaking point in eclipse

前端 未结 1 501
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-09 18:23

I implement a custom ServletContextListener and place the breakpoints on both the contextInitialized() and contextDestroyed().

W

相关标签:
1条回答
  • 2021-02-09 18:53

    The contextDestroyed() will only be called when you gracefully shuts down the server by opening the Servers view and rightclicking the server instance and choosing Stop, or by hitting the red button in the Servers view whose tooltip says Stop the server.

    It will not be called when you terminate the server altogether by hitting the red button in the Console view whose tooltip says Terminate. Terminating (killing) is not the same as stopping.

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