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 introduces the knowledge of "several common ways to introduce Tomcat deployment projects". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
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.
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 can be created automatically or manually when it starts.
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.
This is the end of "introduction to several common ways to deploy Tomcat projects". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.