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

The main idea of ​​​​dynamically setting routing permissions in Vue

I have seen some dynamic routing settings on the ...

Two ways to install the Linux subsystem in Windows 10 (with pictures and text)

Windows 10 now supports Linux subsystem, saying g...

Navicat for MySQL scheduled database backup and data recovery details

Database modification or deletion operations may ...

Docker container connection implementation steps analysis

Generally speaking, after the container is starte...

Discussion on image path issues in css (same package/different package)

In CSS files, sometimes you need to use background...

Several magical uses of JS ES6 spread operator

Table of contents 1. Add attributes 2. Merge mult...

MySQL uses find_in_set() function to implement where in() order sorting

This article introduces a tutorial about how to u...

Do you know why vue data is a function?

Official website explanation: When a component is...

jQuery plugin to achieve carousel effect

A jQuery plugin every day - jQuery plugin to impl...

How to configure Bash environment variables in Linux

Shell is a program written in C language, which i...

Regarding the Chinese garbled characters in a href parameter transfer

When href is needed to pass parameters, and the p...

How to modify the default encoding of mysql in Linux

During the development process, if garbled charac...

Detailed explanation based on event bubbling, event capture and event delegation

Event bubbling, event capturing, and event delega...

Analyzing ab performance test results under Apache

I have always used Loadrunner to do performance t...

Test and solution for MySQL's large memory usage and high CPU usage

After the changes: innodb_buffer_pool_size=576M -...