具体表现为:

使用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. java多线程16:join()的使用

    讲解join()方法之前请确保对于即wait()/notify()/notifyAll()机制已熟练掌握.可以参考前面的笔记 join()方法的作用是等待线程销毁.join()方法反应的是一个很现实的 ...

  2. 01-移动端开发教程-CSS3新特性

    1. 移动端开发课程概述 移动互联网的兴起,让移动端的开发迅速蹿红.对于前端开发者来说,移动端的开发已经占据了他们大部分工作时间.接下来老马带大家一起学习移动端开发的相关前端开发技术. 这边课程内容包 ...

  3. 【转】 Java中的变量赋值和参数传递

    原文地址:http://blog.csdn.net/whmii/article/details/3363667 变量赋值和参数传递是java中两个容易让人迷惑的问题.对于原始类型(primitives ...

  4. docker探索-镜像使用(四)

     前言 当运行容器时,使用的镜像如果在本地中不存在,docker 就会自动从 docker 镜像仓库中下载,默认是从 Docker Hub 公共镜像源下载. 1.查看本地主机上的镜像列表 [root@ ...

  5. spark wordcont Spark: sortBy和sortByKey函数详解

    //统计单词top10def main(args: Array[String]): Unit = { val conf = new SparkConf().setAppName("tst&q ...

  6. STM32 ACM Linux 驱动添加

    kernel 内驱动添加如下: x Symbol: USB_ACM [=y] x x Type : tristate x x Prompt: USB Modem (CDC ACM) support x ...

  7. Java编程的逻辑 (60) - 随机读写文件及其应用 - 实现一个简单的KV数据库

    本系列文章经补充和完善,已修订整理成书<Java编程的逻辑>,由机械工业出版社华章分社出版,于2018年1月上市热销,读者好评如潮!各大网店和书店有售,欢迎购买,京东自营链接:http:/ ...

  8. orderBy 传入属性的字符串

    IEnumerable下面的的OrderBy可以用于集合的排序. public static IOrderedEnumerable<TSource> OrderBy<TSource, ...

  9. kafka中的消费组

    一直以来都想写一点关于kafka consumer的东西,特别是关于新版consumer的中文资料很少.最近Kafka社区邮件组已经在讨论是否应该正式使用新版本consumer替换老版本,笔者也觉得时 ...

  10. 【C】——线程引入 pthread_self 和 pthread_equal 原因 ——解决不同平台的问题!

    1.引入pthread_equal的原因: 在线程中,线程ID的类型是pthread_t类型,由于在Linux下线程采用POSIX标准,所以,在不同的系统下,pthread_t的类型是不同的,比如在u ...