Sometimes when we are writing a web project, there are several projects that need to run at the same time, but there will always be various problems when placing the war package directly, such as deploying multiple projects on the same Tomcat and the same port, or deploying multiple projects on multiple ports of the same Tomcat. After several tests, I decided to share it with you. I won’t talk much about the installation of JDK. Just configure the environment variables. Here is a detailed operation process for you: Deploy tomcat1. Download and decompressDownload tomcat from the official website and decompress it 2. Modify the configuration fileOpen the conf directory Modify the server.xml file to change the http access port (the default is port 8080) <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/> <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/> Can be modified as (for reference only, according to personal needs): <Connector port="8088" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/> <Connector executor="tomcatThreadPool" port="8088" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>
Change the shutdown port (the default is port 8005) <Server port="8005" shutdown="SHUTDOWN" debug="0"> Can be modified as (for reference only, according to personal needs): <Server port="8095" shutdown="SHUTDOWN" debug="0">
(3) Change the JVM startup port (the default is port 8009) <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> Can be modified as (for reference only, according to personal needs): <Connector port="8099" protocol="AJP/1.3" redirectPort="8443" secretRequired="" /> Remember to uncomment this line. It is very important to add the configuration of
Modify logging.properties To solve the problem of garbled Chinese output in the tomcat console Change utf-8 in logging.properties to GBK Running Tests Transplantation Project1. Packaging the original projectIf it is a Maven project, first click the following command to execute install Then, go to the directory of your Maven repository and find the package (if you don’t know your repository directory, you can go there) As shown Next, copy this package 2. Copy to tomcatThen paste it under tomcat's webapps, as shown below In this way, after Tomcat runs, it will automatically decompress it for you 3. Visit and tryFinish! ! ! The above is the detailed content of how to deploy and start multiple tomcats and transplant projects. For more information about tomcat deployment and startup, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: An article to teach you HTML
>>: MySql development of automatic synchronization table structure
Preface Today, a developer gave me feedback that ...
Windows Server 2008 server automatically restarts...
Prerequisites To run containers on Windows Server...
Recently, I encountered a problem in the process ...
Table of contents 1. Follow the wizard to create ...
Preface During my internship at the company, I us...
Download mysql-5.7.19-winx64 from the official we...
Flex Layout Flex is the abbreviation of Flexible ...
Because I want to write a web page myself, I am al...
This article describes the commonly used MySQL fu...
Syntax composition: 1 Annotation information 2 Co...
question: I have a form in Vue for uploading blog...
First, check whether the hard disk device has a d...
According to null-values, the value of null in My...
This article records the installation and configu...