当前位置: 代码迷 >> 综合 >> eclipse+maven新建项目index.jsp页面报错
  详细解决方案

eclipse+maven新建项目index.jsp页面报错

热度:104   发布时间:2023-10-08 22:10:56.0

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

解决方法:

在pom.xml文件中加入

<plugins><!-- 编码和编译和JDK版本 --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>2.3.2</version><configuration><source>1.8</source><target>1.8</target><encoding>utf8</encoding></configuration></plugin></plugins>

然后右键项目名》maven》update project   这个时候你会发现这个错误没有了




  相关解决方案