Two workarounds:
1. If it is a MAVEN project, add the Servlet-api dependency package:
<dependency><groupid>javax.servlet</groupid><artifactid>javax.servlet-api</ Artifactid><version>3.1.0</version><scope>provided</scope></dependency>
- Provided: Indicates that the JDK or container will provide these jars at runtime, which is not required for deployment because the application server must have these things. Provided things are used in compiling and testing, and do not participate in transitive dependencies.
2. If it is not a MAVEN project, add a dependency package in the Java Build path
1) Java Build Path
2) Add Library ...
3) MyEclipse Server Library, Next
4) Select the server-to-Finish you want to deploy to
(original article, reprint please specify the blog from Clement-xu )
Project error: Cannot find class file for Javax/servlet/servletexception