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

CSS3 realizes the glowing border effect

Operation effect: html <!-- This element is no...

JavaScript implements double-ended queue

This article example shares the specific code of ...

Native js to realize a simple snake game

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

How to install docker on ubuntu20.04 LTS

Zero: Uninstall old version Older versions of Doc...

How to configure the pdflatex environment in docker

Technical Background Latex is an indispensable to...

Detailed explanation of how to use grep to obtain MySQL error log information

To facilitate the maintenance of MySQL, a script ...

Detailed explanation of the cache implementation principle of Vue computed

Table of contents Initialize computed Dependency ...

js code to realize multi-person chat room

This article example shares the specific code of ...

How to simplify Redux with Redux Toolkit

Table of contents Problems Redux Toolkit solves W...

Tomcat first deployment web project process diagram

Put your own web project in the webapps directory...

HTML table_Powernode Java Academy

To draw a table in HTML, use the table tag tr me...

Solution to the conflict between nginx and backend port

question: When developing the Alice management sy...

The latest 36 high-quality free English fonts shared

01. Infinity Font Download 02. Banda Font Download...