一、现象描述
笔者在开发工程中经常遇到新建jsp页面的时候报The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path错误,按照字面理解就是这个HttpServlet没有找到,HttpServlet其实存在于Servlet-api.jar文件中,只要引入这个jar包就可以了。笔者搭建的是Maven工程,那我们接下来看看如何在Maven工程中引入。
笔者在开发工程中经常遇到新建jsp页面的时候报The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path错误,按照字面理解就是这个HttpServlet没有找到,HttpServlet其实存在于Servlet-api.jar文件中,只要引入这个jar包就可以了。笔者搭建的是Maven工程,那我们接下来看看如何在Maven工程中引入。