Wood Chen

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

0 comments66 views118 words

This post was translated from Chinese by AI. If anything reads oddly, the Chinese original is authoritative. 中文原文

Cause: The Java web project is missing the library required by the middleware (the Tomcat server). This error generally occurs only in dynamic web projects.

Solution:

(1): Check whether a server runtime environment is configured in Eclipse: Window → Preferences → Server → Runtime Environments →Add → Select the Apache version and click Next, then enter the installation directory of your Apache Tomcat software (after extraction).

(2): Right-click the web project → Build Path → Configure build path... → Java Build Path → Libraries → Add Libray... → Server Runtime →Next> → Apache Tomcat Server →Finish.

(3): Switch to Orader and Export in Java Build Path and check Tomcat.

(4): Right-click the web project → Properties → Project Facets → Select the Runtimes tab on the right → Check Tomcat → OK.

Last updated 2024-01-14

Related posts

Comments 0