具体表现为:

使用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. 【Bayesian】贝叶斯决策方法(Bayesian Decision Method)

    已知某条件概率,如何得到两个事件交换后的概率,也就是在已知P(A|B)的情况下如何求得P(B|A).这里先解释什么是条件概率: 表示事件B已经发生的前提下,事件A发生的概率,叫做事件B发生下事件A的条 ...

  2. ubuntu 安装redis

    1. 下载安装: cd /tmp wget http://redis.googlecode.com/files/redis-2.2.4.tar.gz tar -zxf redis-2.2.4.tar. ...

  3. 【Unity笔记】使物体(船)漂浮在水面上——浮力

    在官方论坛看到一个关于怎么使物体漂浮在水面上的讨论:https://forum.unity3d.com/threads/floating-a-object-on-water.31671/ 水动力系统 ...

  4. logback的日志文件中出现大量的ESC符号

    如下图: 这个日志文件是用less命令打开的,然后看到就惊呆了,日志文件乱成这样的. 开始我以为是我把logback的配置文件弄错了,还看了半天pattern. 然后百度了一下,找了这篇博客: htt ...

  5. Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library

    异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...

  6. Java内存模型和JVM内存管理

    Java内存模型和JVM内存管理   一.Java内存模型: 1.主内存和工作内存(即是本地内存): Java内存模型的主要目标是定义程序中各个变量的访问规则,即在JVM中将变量存储到内存和从内存中取 ...

  7. MFC函数——CWnd::OnCreate

    CWnd::OnCreate afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct ); 返回值: OnCreate必须返回0以继续CWnd对象的创建 ...

  8. 卡片式ViewPager,一屏展示多个pager item,设置高度不一致的tabBar

    ViewPager的基本用法不必多说,这都很简单,我们可以在ViewPager中加载一个ImageView,也可以加载一个Fragment,这都是目前非常常见的用法.那么我今天说的是ViewPager ...

  9. qt configure参数配置介绍

    ======================================全文是按照./configure -help来翻译的==================================== ...

  10. html传值及接收传值

    传值:url?para1=value1&para2=value2 接收传值: <script type="text/javascript"> function ...