具体表现为:

使用Eclipse+Maven建立了一个Javaweb工程,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。

解决方法:

在pom.xml中的  <build></build>中  添加:

    <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即可

如果报错:

Java compiler level does not match the version of the installed Java project facet.    xxx        Unknown    Faceted Project Problem (Java Version Mismatch)

可以:项目--properties---project Facets设置java文件的版本为 1.8(自己对应上面步骤的jdk)

新建maven指定jdk版本-eclipse新建maven项目报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决方案的更多相关文章

  1. eclipse中web工程新建jsp文件报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    web工程中新建jsp文件提示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java ...

  2. 新建jsp报错“The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path”

    今天新建jsp文件时,就报错“Visual Page Editor has experimental support for Windows 64-bit”,然后刚好stackoverflow上面有这 ...

  3. [IDE - Eclipse] JSP报错:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

    是因为Eclipse的Web项目不自动引入相关jar包. Right Click on the Project ❯ Properties ❯ Project Facets. You would be ...

  4. 使用maven创建项目时报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    Description Resource Path Location Type The superclass "javax.servlet.http.HttpServlet" wa ...

  5. java eclipse maven The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方法

    在eclipse 中使用maven 创建java web项目,启动服务器遇到提示:The superclass "javax.servlet.http.HttpServlet" w ...

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

    在maven web项目中的index.jsp中的错误信息如下: The superclass "javax.servlet.http.HttpServlet" was not f ...

  7. maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu ...

  8. maven项目The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    用Eclipse创建了一个maven web程序,使用tomcat8.5作为服务器,可以正常启动,但是却报如下错误 The superclass "javax.servlet.http.Ht ...

  9. 新建 jsp异常,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    新项目,新建jsp页面的时候报异常: Multiple annotations found at this line: - The superclass "javax.servlet.htt ...

随机推荐

  1. oracle Plsql 执行update或者delete时卡死问题解决办法

    PLSQL删除记录 delete from OT_Table 程序一直在执行... 原因: 在执行  修改 的时候没有commit,oracle将该记录锁住了. 可以通过以下办法解决: 先查询锁定记录 ...

  2. 在python3.3后urllib2已经不能再用,只能用urllib.request来代替

    版权声明:本文为博主原创文章,未经博主允许不得转载. 在python3.3后urllib2已经不能再用,只能用urllib.request来代替 response=urllib2.urlopen(' ...

  3. C#学习笔记(13)——传统方法读取XML

    说明(2017-7-12 16:32:47): 1. LINQ的方法虽然很简单,但是有点不好理解,sql的写法总感觉很诡异,而且LINQ的本质也是用的传统方法,所以还是采用老办法吧! 2. 注释里的代 ...

  4. Android 提示应用“正在发送大量短信”的解决办法

    . . . . . 临近过年了,又到了发送各类拜年短信的时刻了.虽然转发各类拜年短信已经显得越来越没年味,但是依然有很对人乐此不疲.为朋友送去祝福自然是好事,可是转发来的短信本身发送者就并没有投入太多 ...

  5. Xcode7.3 beta 新功能 https://developer.apple.com/go/?id=xcode-7.3-rn

    Xcode7.3 beta 新功能html, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin ...

  6. C++中cin的用法汇总

    cin可以用于接收输入,最常见的是从控制台接收.在刚学习C++的时候经常会用cin来接收数据,这里想要系统的总结一下cin的用法,保证不灌水. C++中的cin是一个 istream对象,从标准输入中 ...

  7. C语言 · 递归倒置字符数组

    算法提高 递归倒置字符数组   时间限制:1.0s   内存限制:512.0MB      问题描述 完成一个递归程序,倒置字符数组.并打印实现过程 递归逻辑为: 当字符长度等于1时,直接返回 否则, ...

  8. C语言 · 最长字符串

    算法训练 最长字符串   时间限制:1.0s   内存限制:512.0MB      求出5个字符串中最长的字符串.每个字符串长度在100以内,且全为小写字母. 样例输入 one two three ...

  9. u-boot2011.09 启动流程记录

    start arch/arm/cpu/armv7/start.S 36 .globl _start 37 _start: b reset 136 reset: 137 bl save_boot_par ...

  10. 改改"坏"代码

    程序猿很多时候费了九牛二虎之力使用各种黑科技实现了某个功能,终于可以交差,但整个过程就像个噩梦,一般人是不太愿意回过头去阅读自己写的代码的,交出去的代码就让它如往事般随风吧. 可你不愿读自己的代码,却 ...