One,
1, Tomacat start:
In my windows10 I downloaded the 8.5 version of tomacat, I was to open and close tomacat by ".sh" file
To open a file .sh need
The Git on its official website you can download, nothing to talk about. . .
After downloading the file can be opened startup.sh, this time to pop up a command window, one will disappear. Consumers do not disappear unimportant, open the file startup.sh we open the browser to access http: // localhost: 8080 / can, if normal, then you will have access to Tomacat Home
2, server.xml in the conf directory is stored in the server boot time configuration information
After opening the file
Here is what we try not to change this port configuration, port visit during development
3, logs are stored in a log file, what is the log file is some information about when to shut down your server when to start
Two, Web applications:
Introduces a concept: the default web application , that is, as you visit http: // localhost: 8080 / web applications do not need to specify the same as if you put path = "(which does not write anything)," so put this news configuration It has become the default web application, every time you visit this link to find this information in the default news application
But after we finish each change the server.xml file should restart the server, this time we can find a new solution by looking at Tomacat document, because we are looking for the configuration of the web application content
And then we began to see. . . . . . I am here to speak several programs
1, directly to your application in this folder inside:
For example, your web application is
You put two pages into the news this directory, then this news is a web application
You are in D: \ Tomcat \ apache-tomcat-8.5.46-windows-x64 (1) \ apache-tomcat-8.5.46 \ conf \ Catalina \ localhost directory a.xml write a file, the file contents as described above that row
This time you file name is the virtual path of external access (ie context path), so write it without restarting the server, when accessing visit http: // localhost: 8080 / a can
If you play a file name is a # b # c.xml, this time you access this application can be http: // localhost: 8080 / a / b / c to access
If you want to configure the news this application becomes the default web application you can rename the file to ROOT.xml on it