In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will share with you about the common ways to deploy Tomcat projects. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1 / directly copy the web project files to the webapps directory
This is the most common way. The Webapps directory of Tomcat is the default application directory of Tomcat. When the server starts, all applications in this directory will be loaded. If you want to change this default directory, you can change the appBase value in the Host tag in the server.xml file under conf.
This approach is actually the same as deploying a project in an IDE development environment.
The access path with this method is http://localhost:8080/webname
2 / modify Server.xml file
Find the Host tag in the server.xml file under conf, and add the following code to it:
Path: the root address at the time of access, indicating the access path, which can be customized. As in the example above, the address to access the application is as follows: http://localhost:8080/jfinal_demo;
Docbase: indicates the path of the application. DocBase can use either an absolute path or a relative path relative to webapps
Reloadable: indicates that class packages can be loaded automatically at run time under the classes and lib folders. This property is usually set to true in the development phase to facilitate development, and should be set to false in the release phase to improve the access speed of the application.
For other properties, see the relevant documentation.
3 / add the xml configuration file under the confCatalinalocalhost directory
Create a new file named jfinal_demo.xml, and the file content is configured as follows:
The Catalinalocalhost directory tomcat is not available when downloaded by default. It will be created automatically or manually when you start it for the first time.
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, as in the example above, the application address is as follows: http://localhost:8080/jfinal_demo
The third method is recommended because there is no need to modify the default configuration of tomcat, which is the least intrusive to Tomcat, and if you want to cancel the deployment, you can simply delete the xml configuration file.
Thank you for reading! This is the end of this article on "what are the common ways to deploy Tomcat projects?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.