Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that using shutdown.bat to shut down Tomcat will shut down other Tomcat?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you how to solve the problem that Tomcat will shut down other Tomcats when using shutdown.bat. The content is simple and easy to understand and clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn how to solve the problem that Tomcat will shut down other Tomcats when using shutdown.bat.

The shutdown.bat file contains a sentence

if not "%CATALINA_HOME%" == "" goto gotHome

When executing the close command, the program will look for CATALINA_HOME, which means that if the path configured by the environment variable is not empty, it will execute this, otherwise it will "set CATALINA_HOME=%CURRENT_DIR%", that is, assign the current path to it.

The solution is to find a way

if not "%CATALINA_HOME%" == "" goto gotHome

Prefix rem and comment it out, so that each time the command is executed, only the current path will be operated on.

Namely:

rem if not "%CATALINA_HOME%" == "" goto gotHome

Similarly, if the tomcat port address is already in use, add rem to startup.bat at this point.

As shown in the figure:

The above is "How to solve Tomcat shutdown using shutdown.bat will shut down other Tomcats" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report