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?