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

转载 2016年06月02日 09:21:22

今天使用Eclipse+Maven建立了一个Javaweb工程,并在eclipse中配置了Web容器Jboss eap 6.2。新建jsp页面,添加一个简单

的Java类。可是,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not

found on the Java Build Path。原来Javaweb工程类中没有添加Web 容器Runtime相关类导致。


解决方法很简单,在pom.xml中添加如下配置即可:

复制代码
1 <dependency>
2 <groupId>javax.servlet</groupId>
3 <artifactId>servlet-api</artifactId>
4 <version>2.5</version>
5 <scope>provided</scope>
6 </dependency>
复制代码

相关文章推荐

如何解决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...

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...

新建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
  • 2388

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
  • 184

Java web开发时,The superclass javax.servlet.http.HttpServlet was not found the Java Build Path

我们遇到的错误显示如下: 我们右击有错误提示的文件夹,如下: 我们点击”配置构建路径“,如下: ...
  • hzp666
  • hzp666
  • 2017年02月27日 13:06
  • 345

Description Resource Path Location Type The superclass "javax.servlet.http.HttpServlet" was not foun

经过查找原因,原来是因为忘记设置server runtime environment ,按一下步骤设置即可: 根据自己需要设置对应的server runtim...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not
举报原因:
原因补充:

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