1 / Copy the web project files directly to the webapps directory This is the most commonly used method. Tomcat's Webapps directory is Tomcat's default application directory. When the server starts, all applications in this directory will be loaded. If you want to change this default directory, you can modify the appBase value in the Host tag in the server.xml file under conf. This method is actually the same as deploying a project in an IDE development environment. The access path using this method is http://localhost:8080/webname 2/ Modify the Server.xml file Find the Host tag in the server.xml file under conf and add the following code to it: <Context path="/jfinal_demo" docBase="F:workjfinal_demoWebRoot" reloadable ="true" debug="0" privileged="true">
For other properties, see the relevant documentation. 3 / Add the xml configuration file in the confCatalinalocalhost directory Create a new file named jfinal_demo.xml and configure the file content as follows: <Context path="/jfinal_demo" docBase="F:workjfinal_demoWebRoot" reloadable ="true" debug="0" privileged="true"> </Context> The Catalinalocalhost directory does not exist by default when Tomcat is downloaded. It will be created automatically when it is started for the first time, or it can be created manually. The path attribute can be removed from the configuration, because the root path when accessing the project depends only on the name of the XML file. For example, in the above example, the address to access the application is as follows: http://localhost:8080/jfinal_demo; The third method is recommended because it does not require modifying the default configuration of Tomcat, is the least invasive to Tomcat, and if you want to cancel the deployment, you can directly delete the XML configuration file. The above methods have been tested by myself. In addition, there is also the Tomcat hot deployment method. Summarize The above are several common ways to deploy Tomcat projects introduced by the editor [personally tested]. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor 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:
|
<<: Detailed explanation of views in MySQL
>>: jQuery implements the mouse drag image function
Table of contents 1. Installation Environment 2. ...
First, let me explain that what we want to do is ...
Recently, I received a requirement for function ex...
Table of contents Install and introduce axios dep...
<br />Sometimes you may be asked questions l...
Preface: I reinstalled win10 and organized the fi...
Effect picture (the border color is too light, pu...
Install MySQL database a) Download the MySQL sour...
When using nginx as a reverse proxy, you can simp...
1 Start the Docker service First you need to know...
MySQL previously had a query cache, Query Cache. ...
Scrcpy Installation snap install scrcpy adb servi...
Table of contents What does the COUNT function do...
1. Connect to MySQL Format: mysql -h host address...
1. Indexing principle Indexes are used to quickly...