Tomcat Learning (i)--use eclipse to bind Tomcat and publish apps

Source: Internet
Author: User
Tags stop script

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.