在我们换了tomcat之后,我们用新的tomcat发布任务是,经常会出现这样的问题:就是在jsp页面的页头出现一个提示
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
解决办法:
1、右击工程名------> build path ------> configure build path ------> 找libraries ------> 点击add libraries ------> 点击Server Runtime ------> next ------> 点击你的tomcat版本 ------> finshed
2、Order and Export ------> 在apache tomcat XX(你的tomcat版本)前面打勾 ------>apply ------> OK
3、如果页面上的红色提示话没有去掉,或者你重启了eclipse,红色提示还没有去掉,这时候:
点击eclipse中工具栏上的project ------> clear ------>选择你的项目 ------> 点击clear
问题就可以解决了