Tomcat is simple to build and use

1. Use the command line to check the jdk version;
write picture description here

2. Go to the Tomcat official website to download the corresponding version of Tomcat, for example, if the jdk is 8.0, select Tomcat 8
write picture description here
write picture description here

3. Configure environment variables (find the directory where Tomcat is decompressed and add the root directory path to the environment variables)
write picture description here

4. Start Tomcat, find startup.bat in the bin directory under the Tomcat directory, and double-click it.
write picture description here
5. Verification: Open the browser, enter: http://localhost:8080 , the following figure appears, indicating that Tomcat has been successfully started.
+ write picture description here
6. Configure your own project
6.1 Find webapps in the Tomcat directory, and then create a new project name in it (not in Chinese)
write picture description here
write picture description here
6.2 Copy the WEB-INF folder under the ROOT file under webapps to your own project
write picture description here
write picture description here
6.3 Then you can Put the files you need. For example, I put a json file here. 6.4 Access the
write picture description here
files in the project. For other terminal access, replace localhost with the ip of the computer where Tomcat is built (windows can enter ipconfig through the terminal), for example: http://192.168.16.101:8080/xxx/test.json

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325758318&siteId=291194637