I. INTRODUCTION
Tomcat is a core project of the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals.
Tomcat server is a free open source Web application server, belongs to the lightweight application server, in small and medium-sized systems and concurrent access users are not widely used, is the first choice to develop and debug JSP programs. For a beginner, it can be thought that when the Apache server is configured on a single machine, it can respond to requests for access to the HTML (one application under the standard Universal Markup Language) page.
II: Tomcat Download and installation
1.
Website address: http://tomcat.apache.org/whichversion.html
Tomcat has a green free install version and installation version
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. Start
Bin: Script Directory
Startup script: Startup.bat
Stop script: Shutdown.bat
Tomcate start-up and operation:
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. General Web application directory structure:
Three: Use Eclipse to bind Tomcat and publish apps
Step 1: Get the server running 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
Step 6: Project Right-click/run as/run on Server
Four. Practice
1. Open Eclipse
New->dynamic Web Project
2. Create a new index under WebContent. Html
3. Right mouse button on MyProject run as-on server
4. Enter the address in the browser:
Tomcat server and use Eclipse to bind Tomcat and publish apps