利用eclipse创建web项目时,提示错误:"The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path"
解决方法如下:
看错误提示,知道是没有添加Tomcat运行时类造成。
1、右击web工程->属性或Build Path->Java Build Path->Libraries-> Add Library...->Server Runtime ->Tomcat Server
2、切换到Java Build Path界面中的Orader and Export,选择Tomcat