Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the method for tomcat to deploy a static html website

Shulou Source: shulou.com Published: 2022-05-31 13:58:48 11月16日 Update

Today, I would like to share with you the relevant knowledge of how tomcat deploys static html sites, detailed content and clear logic. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

First, download tomcat (apache-tomcat-8.5.6)

Put static html pages and related files in a directory, such as directory a

Third, put the a directory under the..:\ apache-tomcat-8.5.6\ webapps directory

Specify the tomcat access port number (find the server.xml file in the directory shown in the figure and open it)

5. Find the port port line and change the port number you want to use (as long as it is not occupied) as shown in the figure:

6. Add a line of code at the end of this file, where the docbase path can be written from tomcat to your a directory (the xml file in a directory is the absolute path of your access address) as shown in the following figure

7. For example, if ip is 192.168.1.188 and port is 8888, if I want to access the start.html in directory a, the access address is: 192.168.1.188:8888/a/strat.html

8. Even if you deploy a static html website to tomcat, it is over.

These are all the contents of the article "what is the method for tomcat to deploy static html sites". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Directories static files knowledge articles websites methods content slogans addresses that is ports paths as shown in figure different very large one line code most of which I want Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB Redmi Linux MySQL