directory

1. Download Tomcat

2. Run apache-tomcat-7.0.105.exe installation package

3. Configure the administrator and password

4. Configure server ports

5. Tomcat server test


Hello! Hello, I’m grey Ape! A super bug writing program ape!

Recently, while learning Java Web development, I needed to publish the project to the Tomcat server, so here is a basic tutorial on setting up the Tomcat server in the Windows environment.

 

Java has a wealth of server-side applications, such as servlets, JSPS, and many third-party frameworks.

Development on the Java Web is based on requests and responses,

Requests and responses can be understood as follows:

Request: The browser (client) sends a request to the server asking for access to the project,

Response: The server receives the request and responds by sending the response back to the browser.

The Tomcat server is such a presence here.

The relevant process is shown in the figure:

Here is the Tomcat server deployment tutorial for Windows:

 

1. Download Tomcat

Tomcat is a free and open source servlet container, which can be downloaded from the official website:

Tomcat.apache.org/download-70…

In the homepage, we can choose to download different Tomcat versions according to the different versions of your computer and JDK. Here I use JDK10, so I downloaded the last one.

You can also download it according to the following table:

 

2. Run apache-tomcat-7.0.105.exe installation package

After downloading, click Run tomcat installation package to see the following interface. For the Next steps, just click Next.

 

3. Configure the administrator and password

When installing to the following interface, Tomcat will remind us to configure the administrator user name and password. Its function is that when we open and run the Tomcat server again, we will enter the corresponding user name and password. Also, we can choose not to set here and directly click next.

 

4. Configure server ports

The next step is to set the port number of the Tomcat server. The default port number of the Tomcat server is 8080. For convenience and error prevention, you are not advised to change the default port number.

 

5. Tomcat server test

After the Tomcat server is set up, the following folders will appear in our installation path:

The use and functions of these folders are as follows:

Directory structure and usage of Tomcat
Tomcat directory use
/bin Stores command files for starting and shutting down Tomcat
/lib Store JAR files that are accessible to the Tomcat server and all Web applications
/conf Stores Tomcat configuration files, such as server. XML and web. XML
/logs Stores Tomcat log files
/temp Stores temporary files generated when Tomcat is running
/webapps This is where you usually put your Web application directories and files
/work Tomcat puts the Servler source files and bytecode files generated by the JSP into this directory

 

Here are some things to note:

For developed Java Web applications, after deployment, the applications are placed under/Webapps in a directory structure. After that, on the premise that port 8080 is not occupied, you can successfully run the Tomcat server by clicking tomcat7.exe in the /bin folder.

The effect is as follows:

After input http://localhost:8080 or http://127.0.0.1:8080localhost in the browser, if you see the following page, prove started successfully

 

Think useful remember to like attention yo!

Big bad Wolf accompany you to progress together!