Eclipse新建web项目出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

Eclipse新建web项目出现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 Build Path,经过仔细查看,原来是javaweb工程中没有添加tomcat运行时的相关类导致

解决方法:

方法1.找到tomcat安装路径,在tomcat根目录下的lib文件夹里,有一个servlet-api.jar,将这个jar包导入到项目中即可;

方法2:(1)右击web工程->属性或Build Path->Java Build Path -> Libraries -> Add Library... ->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-07 05:27:20

Eclipse新建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 Build Path

在pom.xml中添加下面代码来下载servlet-api: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency>

新建 jsp异常,The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path

新项目,新建jsp页面的时候报异常: Multiple annotations found at this line: - 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 右

java web报错The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path

刚用maven建立了一个web项目,结果报错了,解决办法 原文地址:https://www.cnblogs.com/huifeidezhuzai/p/10015531.html

新建jsp报错“The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path”

今天新建jsp文件时,就报错“Visual Page Editor has experimental support for Windows 64-bit”,然后刚好stackoverflow上面有这个错误的解决方案,传送门:https://stackoverflow.com/questions/30274852/visual-page-editor-has-experimental-support-for-windows-64-bit,据说是JBoss的小问题,然后就按照操作了一遍,但还是报错

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

web工程中新建jsp文件提示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方案: 1.右击web工程->属性或Build Path->Java Build Path->Libraries-> Add Libray...->Server Runtime ->JBoss 7.1 Runtime   2.切换到Java Bui

Eclipse中新建Maven Web项目报错:The superclass &quot;javax.servlet.http.HttpServlet&quot; 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

eclipse新建maven项目报错The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path的解决方案

具体表现为: 使用Eclipse+Maven建立了一个Javaweb工程,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path. 解决方法: 在pom.xml中的  <build></build>中  添加: <plugins> <!-- 编码和编译和JDK版本 --> <plug

Eclipse导入JavaWeb项目报错:The superclass &quot;javax.servlet.http.HttpServlet&quot; 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中,项目有红叉之- The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path

1.The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 2.原因:确实servlet-api.jar 3.导入servlet-api.jar,其中一种方法:项目右击->build path->configure build path->add library->server runtime->apache tomcat