"Tomcat" A minute teaches you how eclipse configures Tomcat (ii)

Source: Internet
Author: User
Tags apache tomcat

For beginners, how to configure Tomcat under Eclipse, is completely a group of fog, do not know how to start, in this, we spend 10 minutes, using the simplest way to introduce the text, hope to help you.

Preparation Tools

Windows operating system
Development tools: Eclipse (please download the unzip version on your website)
Server: tomcat6.x or 7.x (please download the unzip version on your website)

Preparing the development environment

Install JDK, you need to install JDK1.6 or 1.7 can, I use the jdk1.8, the best you still use jdk1.7, the others are the same.

Configuration steps

Download good tomcat, after decompression can be used, the same can be extracted to their own computer the most suitable location, do not explain more, please see above.

Our blog post focuses on two ways that eclipse configures Tomcat.

Configure Tomcat When you create a new project

1. Open Exclipse, file under the menu bar (or right-click in Project Explorer) –new–other ..., open and locate Web–dynamic Web Project, and then click Next.
Such as:

2. Only next step, the following dialog box appears, the main items are as follows (which is not mentioned in the default, do not modify, as shown in the main configuration):
Project Name: item name,
Target Runtime: Click on the right "New runtime", choose your own server, here we choose: Apache–apache Tomcat v7.0, select, click "Next", there is an entry: Tomcat Installation directory: Locate the location where you unzipped the TOMCAT7. Then click "Finish".
Configuration: Click on the right "Modify", can be properly configured, but according to my beginner experience, completely use the default on the line, do not move the inside of things. When you use the configuration inside, you're already a veteran.



3. When the above configuration is complete, click "Next",
Such as:

4. Next, continue to click "Next",
Such as:

5. Next, select by icon, you need to configure Web. XML, hit "hook". Click "Finish".
Such as:

6. After the previous configuration is complete, the "Servers" and "HelloWorld" items appear in Project Explorer, such as

7. Below eclipse there is a servers tag (no tag, select Servers under Menu Window–show view–other), right-click New–server, please look directly at the image shown.


8. When the previous step is complete, a

9. The basic configuration of Tomcat under Eclipse is complete here. Then you need to start the server and test it with the code.

Configuring Tomcat in Eclipse
    1. Under Eclipse, under Menu window, select Preferences, locate server, and select runtime environments.
      Such as:
    2. Select Add to add
      Such as:
    3. The second step in the first way is no longer more tiring.

Two ways each have individual use occasions
1. In the first way, you can easily configure Tomcat when you create a new project, or you can set up your project first, then use the second way to configure Tomcat.
2. The second way, the project has been established, we just need to import into our eclipse and configure Tomcat.

Summarize

Eclipse offers a variety of configuration options, simple and convenient.

In the next blog post, let's say a few words about how Tomcat is deployed in Web applications.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"Tomcat" A minute teaches you how eclipse configures Tomcat (ii)

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.