Tag Archives: The import javax.servlet cannot be resolved

How to Solve “The import javax.servlet cannot be resolved” Error

This problem is caused by the removal of the previous runtimeserver.

It usually also occurs when you import another person’s project a second time.

Two solutions:

1. Copy and paste the servlet-api.jar in the Tomcat file lib being used into the web/inf lib under the current error reporting project

2. Project properties build Java path – add library server runtime – select the currently used server finish

solve

The solution of the import javax.servlet cannot be resolved in Java

The import javax.servlet cannot be resolved solution appears  

The method provided on the Internet is, in Eclipse, right-click the project, select Build Path->configure build path->Libraries->Add External JARs, find the decompression path of tomcat on your computer, and select “servlet-api” under the lib folder .jar”, add and click “OK”

Description Resource Path Location Type Java compiler level does not match the version of the insta

Right-click Properties-“Project Facets on the project, and select the corresponding version in the Java drop-down list on the opened Project Facets page.
It may be java1.6 changed to java6 or something

 

 

Could not find HttpServlet