Tomcat's method of setting ports through placeholders (i.e. parameter specification method)

Tomcat's method of setting ports through placeholders (i.e. parameter specification method)

For work needs, I found a lot of information on the Internet, but all of them were copy and pasted, and did not solve the actual problem. It took me a long time to finally get it done.

There are three ways:

The first is to call the startup command line with startup parameters

1. Set in conf/server.xml as follows: port="${http.port}"

2. Set in bin/catalina.xml as follows: JAVA_OPTS="JAVA_OPTS" -Dhttp.port='50000'" (the port number you want to set)

3. Restart tomcat

4.IP+port access indicates successful setup

5. Finally, start Tomcat normally. You can see the calling method in the command line through the startup parameters.

Summarize

This is the end of this article about how to set the port through placeholders in Tomcat (i.e. parameter specification method). For more information about setting the port through placeholders in Tomcat, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to modify the default port when starting a web project using the Maven tomcat:run command
  • How to modify the default port number 8080 of Tomcat
  • Tomcat shows that port 8080 is occupied. Graphical solution
  • Tomcat 7 deploys two projects by setting different ports
  • Modify the default port number of Tomcat
  • How to set the default port of Tomcat (picture and text)
  • How to handle Tomcat startup error (port 8080 is occupied)
  • Tomcat multi-port multi-application

<<:  Steps for restoring a single MySQL table

>>:  vue-element-admin global loading waiting

Recommend

CSS overflow-wrap new property value anywhere usage

1. First, understand the overflow-wrap attribute ...

Three implementation methods of Mysql copy table and grant analysis

How to quickly copy a table First, create a table...

Vue makes a simple random roll call

Table of contents Layout part: <div id="a...

4 Scanning Tools for the Linux Desktop

While the paperless world has not yet emerged, mo...

How to solve the phantom read problem in MySQL

Table of contents Preface 1. What is phantom read...

How to view and modify the time zone in MySQL

Today I found that a program inserted an incorrec...

Detailed explanation of several ways to create a top-left triangle in CSS

Today we will introduce several ways to use CSS t...

How to configure Nginx virtual host in CentOS 7.3

Experimental environment A minimally installed Ce...

CSS3 flexible box flex to achieve three-column layout

As the title says: The height is known, the width...

Detailed explanation of Linux lsof command usage

lsof (list open files) is a tool to view files op...

Summary of some tips on MySQL index knowledge

Table of contents 1. Basic knowledge of indexing ...

Detailed explanation of crontab scheduled execution command under Linux

In LINUX, periodic tasks are usually handled by t...