Maven搭建项目jsp报错

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path ?


虽然pom.xml文件中创建了Tomcat但是任然报错。原因是因为pom.xml缺少servlet的依赖。于是在pom文件中添加:

 <dependency>
 <groupId>javax.servlet</groupId>
 <artifactId>javax.servlet-api</artifactId>
 <version>3.0.1</version>
 <scope>provided</scope>
 </dependency>




猜你喜欢

转载自blog.csdn.net/qq_37529900/article/details/78955903