How does eclipse import servlet packages?

Source: Internet
Author: User
Tags java web tomcat server apache tomcat

It was hard to write a Java Web project in the book and found that the hint packet could not be found (the red wavy line appears):

To solve the problem, proceed to the appropriate package as follows:

Import Method:

Right-click your Eclipse Project and choose Build Path -- Configure build Path

( Add Library, preperties , Java Build Path, libraies) 。

Click on the " Library (libraies)" tab to the right of the " Add Library" button, and in the " Add Library " dialog box that appears, select " Server Runtime , click Next, in the dialog box that appears, select the Tomcat server you are using, for example, my: Apache Tomcat v6.0, and click Finish.

Your Tomcat class library is now added to the current project. Expand Java resources:src->libraries, and you'll see that the Apache Tomcat V6.0[apache Tomcat v6.0] class library has been added to the current project.

Summary:

In general, you need to load 3 types of jars,

1, Container package (Apache tomcat package), some servlet-related packages are inside;

2, JRE package/JDK package;

3, the WEB project contains the package, that is placed in the "web-inf/lib" Directory of files;

As shown in the following:


How does eclipse import servlet packages?

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.