“This is the second day of my participation in the Gwen Challenge in November. See details: The Last Gwen Challenge in 2021”

preface

Hello everyone, I'm gw_Gw. I'm glad to learn and progress with you.Copy the code

The following content is from the network, if there is any infringement, please contact me to delete, this article is only used for learning exchange, not for any commercial purposes.

Abstract

This article mainly introduces how to use the Tomcat server. A static web page is set up to introduce the Tomcat server.Copy the code

Set up static pages using the Tomcat server

Using the Tomcat server is similar to using the Nginx server, except that the Tomcat server requires a Java environment to run.

For an introduction to and use of the nginx server, see Nginx for beginners – creating static Web pages using the Nginx server in detail

1.1 Downloading the Tomcat Server

Download link: dlcdn.apache.org/tomcat/tomc…

Download the file and decompress it to a non-Chinese directory without Spaces.

1.2 Starting the Tomcat Server.

The Tomcat server requires a Java environment to run. Before starting the Tomcat server, configure the Java environment.

  1. Open the decompressed folder and go to the bin directory. Enter CMD to enter the DOS window.

  1. On the cli, enter startup.bat

  1. Open your browser and type http://localhost:8080/

    If the following screen is displayed, the startup is successful.

1.3 Adding static Pages to the Tomcat Server

  1. Open the decompressed folder and go to the ROOT directory of the Webapps. Delete the files inside.

  2. Place the template for the prepared static web page in the ROOT directory.

1.4 Refresh the page

Open the browser and enter http://localhost:8080/ to get the following interface:

1.5 Exiting the Tomcat Server

On the cli, enter shutdown.bat

conclusion

On the use of Tomcat server is introduced here, I hope to help readers, if there is something wrong, welcome to dig friends criticism.