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

CocosCreator Getting Started Tutorial: Network Communication

Network Communication Overview When developing an...

Ideas and codes for implementing waterfall flow layout in uniapp applet

1. Introduction Is it considered rehashing old st...

JS practical object-oriented snake game example

Table of contents think 1. Greedy Snake Effect Pi...

How to use CSS to write different styles according to sub-elements

The effect we need to achieve: What is needed The...

Solution to Linux not supporting all commands

What should I do if Linux does not support all co...

How to install Jenkins using Docker

Table of contents 1. Pull the image 2. Create a l...

Install mysql 5.6 from yum source in centos7.4 system

System environment: centos7.4 1. Check whether th...

Detailed analysis of compiling and installing vsFTP 3.0.3

Vulnerability Details VSFTP is a set of FTP serve...

How to use mysql index merge

Index merging is an intelligent algorithm provide...

How to recompile Nginx and add modules

When compiling and installing Nginx, some modules...

Detailed installation tutorial of Mysql5.7.19 under Centos7

1. Download Download mysql-5.7.19-linux-glibc2.12...

How to force vertical screen on mobile pages

I recently wrote a mobile page at work, which was...

Native JS to achieve blinds special effects

This article shares a blinds special effect imple...

Docker installation and deployment of Net Core implementation process analysis

1. Docker installation and settings #Install Cent...