Wednesday 12 June 2013

The import javax.servlet can't be resolved

Error : The import javax.servlet can't be resolved in eclipse

Soultion

You need to add the Servlet API to your classpath. In Tomcat 7.0, this is in a JAR called servlet-api.jar in Tomcat's lib folder.
steps to add the JAR into your project class path.

Right-click the project, click Properties.
Choose Java Build Path.
Click Add External JARs
Browse to find servlet-api.jar and select it.
Click OK to update the build path.
Clean and build the project

No comments:

Post a Comment