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

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

今天建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat。JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。原因是Javaweb工程类中没有添加Tomcat运行时相关类导致。

下面是具体的解决方法:

1、右击web工程-->属性或Build Path-->Java Build Path-->Libraries-->Add Libray-->Server Runtime-->Tomcat Server

2、切换到Java Build Path界面中的Orader and Export,选择Tomcat。

注意:

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

时间: 2024-10-14 11:48:00

eclipse:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的相关文章

eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 今天建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat.JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu

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

JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 好久不写Jsp,今天建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat.原本开心的新建jsp页面,添加一个简单的Java类.可是,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServl

JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决办法

JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 好久不写Jsp,今天建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat.原本开心的新建jsp页面,添加一个简单的Java类.可是,JSP页面顶端出现"红色"的报错信息:The superclass "javax.servlet.http

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

解决方案: 1.根据文档检查发现并没有安装Tomcat,然后准备在Eclipse中安装Tomcat. JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 2.Eclipse中集成Tomcat,安装好以后,在菜单栏依旧没有猫咪.于是又准备去进行第三步,安装Tomcat插件. http://www.cnblogs.com/leiOOlei/p/3372258.h

Eclipse导入JavaWeb项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

JavaWeb项目中写的JSP页面需要Web容器解析处理成HTML才能展示到前端浏览器,解析JSP需要Web容器.JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path. javax.servlet.http.HttpServlet是Web容器Tomcat包中的类,将需要的jar包导入项目中就能解决这个问题. 下面是具体的解决方法: 右

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 found on the Java Build Path 从错误信息可以看出来,找不到该类,也就是说找不到相应jar包. 所以解决方法就是引用相应jar包即可. 前提: 需要设置Server Runtime, Window -> Perferences -> Server -> Runtime

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

问题描述: 我们在用Eclipse进行Java web开发时,可能会出现这样的错误:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path.我们该怎么解决这个问题呢? 问题原因: 原来Javaweb工程类中没有添加 Tomcat运行时相关类 导致.尤其是导入项目的时候最容易出现. 解决办法: 下面是具体的解决方法: 1.右击 web工程 --> 属性或Build Path --> Co

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

刚刚新建完Maven项目,一般都会报这个错误,原因是没有默认添加需要的javax.servelet的jar包,所以打开pom.xml文件添加如下dependency即可: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency>

新建web工程报错:The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path

解决方法一:找到tomcat安装路径,在tomcat根目录下的lib文件夹里,有一个servlet-api.jar,将这个jar包导入到项目中即可: 解决方法二:(1)右击web工程->属性或Build Path->Java Build Path -> Libraries -> Add Library... ->Server Runtime -> Tomcat Server (2)切换到Java Build Path界面中的Orader and Export,选择Tom