1. Download Tomcat
Website address: http://tomcat.apache.org/whichversion.html
2. Directory structure
Bin: Script Directory
Startup script: Startup.bat
Stop script: Shutdown.bat
Conf: Configuration file directory (config/configuration)
Core configuration file: Server.xml
User Rights profile: Tomcat-users.xml
All Web project default profiles: XML
LIB: Dependent libraries, Tomcat, and jar packages needed in Web projects
Logs: Log file.
Localhost_access_log.*.txt Tomcat Records user access information, and Star * represents time.
Example: Localhost_access_log.2016-02-28.txt
Temp: Temporary file directory, folder contents can be arbitrarily deleted.
WebApps: The directory where the Web project is published by default.
Work:tomcat handles the working directory of the JSP.
3, the start and operation of Tomcate
Double-click Startup.bat under the bin under Tomcat to start Tomcat
Enter http://localhost:8080 in the address bar of the browser and see the following page to prove the successful start
4. Web application directory Structure
Note: The Web-inf directory is protected and cannot be accessed directly by the outside world
5. Use eclipse to bind Tomcat and publish your app
Step 1: Get the server run environment configuration, Window/preferences/server/runtime Environmen
Step 2: Add a server
Step 3: Select the address of the server on the hard disk, and then all are OK/next/finish
Step 4: Complete success
Step 5: Set the publishing location
Modifying the location of a tomcat publication
Then create a new index.html file in the WebContent directory with the following contents:
Welcome to my project,xixixixi!!! 9 </body>10
Step 6: Project Right-click/run as/run on Server
The effect is as follows:
The results of the operation in Firefox are as follows:
Tomcat Learning (i)--use eclipse to bind Tomcat and publish apps