eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found


错误实例:

eclipse Promblems 显示:

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found


工程上显示:

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found

解决办法:

1、右击web工程-->probertiesBuild Path-->Java BuildPath-->Libraries-->Add Libray-->Server Runtime-->Tomcat Server

2、切换到Java Build Path界面中的Oraderand Export,选择Tomcat


操作如下:

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found


2.选择: 点击Next

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found


4.

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found


最后点击finish

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found