Tool version compatibility problem
Tomcat It's common and free web The server .
Correct
Tomcat The origin of the name ,Tomcat It's a wild cat , Not dependent on humans , Live independently . Tomcat The author of , The original intention of this name is to hope , This server can be self reliant , provide for oneself , image Tomcat Such a wild animal is generally , Do not rely on other plug-ins , And can independently provide web The effect of service . Step 2 : use tomcat after , visit html Step 3 : How to start tomcat Step 4 : How to deploy web pages Step 5 : 8080 What the hell ?
Do not use tomcat You can also open html page , But you can see it in the browser address
file:d:/test.html Such a format , It is opened by opening a local file
But what we usually see on the Internet html The website is usually : http://12306.com/index.html This form This is because there are web The existence of the server
use tomcat after , You can do this
127.0.0.1:8080/test.html Like visiting a website , Visit a html The file is .
This is because tomcat Itself is a web The server ,test.html Deployed in this web On the server , So you can access it like this .
First download on the right tomcat.rar
Decompression in d: disc , Wherever you unzip , Usually decompress it in a good place to find , Because subsequent learning needs to start it frequently Then run the batch file : D:/tomcat/bin/startup.bat Finally, if you see Server startup in xxx ms, It indicates that the startup is successful . notes Tomcat After startup , Don't close .... Once closed, you can't access .... For normal operation , Please be sure to confirm the current java The environment is JDK1.8. Enter... On the command line java -version Check reference resources JDK Download and configuration methods : JDK1.8 And higher version download and environment variable configuration JDK9 Not stable enough , especially Tomcat7 Can't be in JDK9 Run in , Do not use JDK9 Run this Tomcat7, Please switch to JDK8, thank you
Deploy a fully functional web application There are many ways , But if you just deploy one test.html, It's simple
hold test.html Copy to D:\tomcat\webapps\ROOT Under the directory You can pass http://127.0.0.1:8080/test.html Visited
8080 yes tomcat The default port number
The usual Internet address , For example http://12306.com/index.html There is no port number How to make tomcat It's also made like this ? Please continue to the next chapter , to tomcat Change port
The official account of programming , Follow and get the latest tutorials and promotions in real time , thank you .
![]()
Q & A area
2021-06-15
Follow the instructions ,404 page
The answer has been submitted successfully , Auditing . Please
My answer Check the answer record at , thank you
2020-06-10
Run a flash solution
2 One answer
up-bear Jump to the problem location Answer time :2021-04-26
I followed this tutorial first :https://blog.csdn.net/qq_40881680/article/details/83582484 After the operation, some situations described in the link provided by the subject appear , To solve the problem . The startup page is garbled. Please see this :https://blog.csdn.net/qq_40881680/article/details/100067235 But there's a small problem with mine , After restart, use... On the command line startup.bat Command cannot open , Only by double clicking startup.bat File to open tomcat
call_me_Reven Jump to the problem location Answer time :2020-12-14
Mine also flashed by , before JDK I did it myself , then JDK and tomcat Replace them all with how2j Website , Just
The answer has been submitted successfully , Auditing . Please
My answer Check the answer record at , thank you
2020-06-04
website 404 It could be 8080 Port occupied , You can change the port , Or kill Take up 8080 Port process resolution .
2020-05-15
about startup.bat
2020-05-13
stay IE It can be displayed normally on the . stay chrome It's garbled
Too many questions , Page rendering is too slow , To speed up rendering , Only a few questions are displayed on this page at most . also 45 Previous questions , please Click to view
Please... Before asking questions land
The question has been submitted successfully , Auditing . Please
My question Check the question record at , thank you
|