JavaWeb: The error message The superclass "javax.servlet.http.HttpServlet" was not found
on the Java Build Path. I have
n't written Jsp for a long time. Today I established a Javaweb project and configured the Web container Tomcat in eclipse. Originally happy to create a new jsp page, add a simple Java class. However, a "red" error message appeared at the top of the JSP page: The
superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path. It turns out that Tomcat runtime related classes are not added to the Javaweb project class.
The following is a specific solution:
1. Right-click the web project-"Properties or Build Path-"Java Build Path->Libraries->
Add Libray...->Server Runtime -"Tomcat Server
2. Switch to
Orader and Export in the Java Build Path interface, select Tomcat.
Note:
When operating according to the above method, if
it is blank after opening Server Runtime, you need to set up the Apache server. The setting method is: window->Preferences->Server->Runtime Environment -> add --> Select the Apache version and click Next, and then fill in the installation (decompressed) address of your apache server software.