新建Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

新建Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

新建Maven项目后报错,The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

解决方法:

项目上右击鼠标,选择 Build Path => Configure Build Path,弹出下面的菜单。
新建Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
点击Server Runtime
新建Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

新建Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

点击Finish。完成