In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to set up the virtual directory and configure the virtual path in Tomcat7.0, which is very detailed and has certain reference value. Interested friends must finish reading it!
Tomcat7.0 set up virtual directory
(1) at present, our websites are placed in the default directory: tomcat/webapps/. However, in some cases, we need to put the site in another directory, for example, there is insufficient space on the disk where tomcat is located.
Or for the sake of unified management of the project, you want to put it in a specific directory instead of the default directory.
(2) so we are using today's method to solve this problem (also by modifying the config/server.xml file):
(3) follow the picture below to find the server.xml file (config-server.xml notepad can be opened)
(4) after opening it, pull it to the bottom to find the place where there is HOST
The red circle is the part you need to add.
Represents a single Web application running on the
One can have more than one
< Context>Element, each Web application must have a unique URL path, which is set in the attribute path in.
Attributes of the element:
Path: specifies the URL entry to access the Web application. Path must start with "/", otherwise an error will be reported.
DocBase: specify the file path of the Web application, which can be given either absolutely or relative to the appBase attribute. If the Web application adopts an open directory structure, specify the root directory of the Web application, and specify the path of the war file if the Web application is a war file.
Reloadable: if this property is set to true,tomcat server to monitor changes to class files in the WEB-INF/classes and WEB-INF/lib directories while running, and if class files are detected to be updated, the server will automatically reload the Web application.
Setting the reloadable property to true during the development phase is helpful to debug servlet and other class files, but to increase the server load, it is recommended that reloadable be set to false during the release and storage phase of the Web application.
For example, in my address bar, you can enter localhost:8080/lecheng in the address bar
OK! Just visit here successfully!
The above is all the contents of the article "how to set up a virtual directory and configure a virtual path in Tomcat7.0". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.