JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build

原创 2016年08月31日 15:40:45

使用Eclipse+Maven建立了一个Javaweb工程,新建jsp页面时页面顶端出现“红色”的报错

原来是Javaweb工程类中没有添加Web 容器Runtime相关类导致。

解决办法:

在出现此错误的项目上单击鼠标右键》Build Path》Configure Build Path
这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

若打开Server Runtime后一片空白,需要设置Apache服务器。设置方法为:window->Preferences->Server->Runtime Environment -> add –> 选择Apache的版本后点Next,再填入你apache服务器软件的安装(解压后)地址

这里写图片描述

这里写图片描述

如果还提示错误,还可以尝试下面的方式

在pom.xml中添加如下配置即可:

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

有时候eclipse反应会比较慢,等待会儿后才有效

如何解决JSP页面顶端报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

题目有点长,昨天刚接触jsp,按照网上的教程安装完 tomcat 和 eclipse EE 之后,新建jsp文件却出现了如下报错: The superclass "javax.servlet.http...

创建一个jsp页面报:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

主要是缺少Tomcat运行时相关类导致的,简单的说就是找不到tomcat(服务器),解决方法如下: 1、报错页面: 2、右击所在的项目->Build Path->Configu...

JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path"

eclipse刚安装好,新建工程的时候jsp页面顶端出现错误: The superclass “javax.servlet.http.HttpServlet” was not found on t...

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path表头报错解决

用eclipse做jsp文件,自动创立的文件表头出现这个报错,应该怎么处理? JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpSe...

新建JSP无法运行出现错误The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Pat解决办法

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
  • UckyK
  • UckyK
  • 2014年10月13日 23:33
  • 2494

eclipse部署java web程序报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Buil

eclipse部署java web程序报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Buil...

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

遇到错误: The superclass “javax.servlet.http.HttpServlet” was not found on the **Java Build Path 解决方...

【SpringMVC】The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path解决方案

1.配置Tomcat   Eclipse下方的选项卡【Servers】点击【No servers are available.Click this link to create  a new ser...
  • celiacy
  • celiacy
  • 2017年03月07日 09:28
  • 214

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决办法

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决办法

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

完整错误信息:THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"AS IS" AND ANY EXPRESS OR...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build
举报原因:
原因补充:

(最多只允许输入30个字)