问题描述
新建一个java项目,在WebContent下新建了一个jsp页面,页面顶部报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
解决方案
模块的Build Path缺少Tomcat的Library
项目右键 - Build Path - Configure Build Path - Add Library - Server Runtime - Tomcat
- 项目右键 - Build Path - Configure Build Path
- 点击Add Library
- 选择Server Runtime
- 选择相应版本的Tomcat
- Finish后确定即可