Project error: Cannot find class file for Javax/servlet/servletexception

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.