An error occurred after opening the project with Eclipse:
The import Javax.servlet cannot be resolved
Java and javax are Java API (application programming Interface) package, Java is the core package, javax x is extension meaning, that is, the expansion package
"Problem Analysis"
No Servlet-api.jar this bag.
In general, we import other people's projects, on other people's machine he configured the server, is generally tomcat, and in the process of copying the server library will not be copied with the project, Unless someone else has copied the Tomcat library to Web-inf\lib.
"Solutions"
Programme one:
Find this package under the Lib directory of Tomcat
Then in Eclipse, right-click the project, choose Build Path---Configure build path ...-Libraries Add External JARs ..., find Tomcat on your computer Install the path, under the Lib folder, check "Servlet-api.jar", add click "OK", it's OK
Scenario Two:
Locate Servlet-api.jar under the Tomcat installation path (for example: F:\JavaWebDev\apache-tomcat-8.0.32), and copy it to the project's Webcontent\web-inf\lib directory, and then refresh (F5) The project, it's ready.
Programme III:
Right-click Java Build Path, Add Library, Project--Properties----server Runtime, Next--Select your Server (my "Apache Tomcat v8.0"), Finish
"See" http://slf-1983.blog.163.com/blog/static/29902363201191555019355/
An error occurred after Eclipse opened the project: the import Javax.servlet cannot be resolved