Solve the problem that shutting down Tomcat using shutdown.bat will shut down other Tomcats

Solve the problem that shutting down Tomcat using shutdown.bat will shut down other Tomcats

The shutdown.bat file has a sentence

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

When executing the shutdown command, the program will search according to CATALINA_HOME. This means that if the path configured by the environment variable is not empty, this will be executed, otherwise " set CATALINA_HOME=%CURRENT_DIR% ", that is, the current path will be assigned to it.

The solution is to

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

Add rem in front to comment it out, so that each time the command is executed, only the current path will be operated.

Right now:

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

Similarly, if the port configuration for starting Tomcat is invalid (address already in use), add rem to this place in startup.bat.

As shown in the figure:

Summarize

The above is what I introduced to you to solve the problem that shutting down Tomcat using shutdown.bat will shut down other Tomcats. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • How to control Tomcat startup and shutdown in Asp.net
  • How to start/stop Tomcat server in Java
  • Java code closes the tomcat program and analyzes the problems
  • A bug fix for Tomcat's automatic shutdown

<<:  A brief discussion on innodb's index page structure, insert buffer, and adaptive hash index

>>:  Detailed explanation of InnoDB architecture and features (summary of InnoDB storage engine reading notes)

Recommend

MySQL 5.7.21 installation and configuration method graphic tutorial (window)

Install mysql5.7.21 in the window environment. Th...

How to use nginx to build a static resource server

Taking Windows as an example, Linux is actually t...

GET POST Differences

1. Get is used to obtain data from the server, wh...

Why Google and Facebook don't use Docker

The reason for writing this article is that I wan...

js to achieve simple accordion effect

This article shares the specific code of js to ac...

202 Free High Quality XHTML Templates (1)

Here 123WORDPRESS.COM presents the first part of ...

How much do you know about JavaScript inheritance?

Table of contents Preface The relationship betwee...

Pitfalls and solutions encountered in MySQL timestamp comparison query

Table of contents Pitfalls encountered in timesta...

WeChat applet to obtain mobile phone number step record

Preface Recently, I encountered such a problem wh...

CSS sets Overflow to hide the scroll bar while allowing scrolling

CSS sets Overflow to hide the scroll bar while al...

MySQL sharding details

1. Business scenario introduction Suppose there i...