用Eclipse开发JavaWeb项目:错误信息 "javax.servlet.http.HttpServlet" was not found on the Java Build Path

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

2.错误原因:原来Javaweb工程类中没有添加Tomcat运行时相关类导致

3.解决办法:

1).右击web工程->Properties或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-13 21:00:35

用Eclipse开发JavaWeb项目:错误信息 "javax.servlet.http.HttpServlet" was not found on the Java Build Path的相关文章

错误: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.我们该怎么解决这个问题呢? 下面是具体的解决方法: 右击web工程->属性或Build Path->Java Build Path->Libraries-> Add Libray...->Server Runtime ->Tomcat

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新建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: 报错信息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

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

eclipse新建maven项目报错The superclass "javax.servlet.http.HttpServlet" 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

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

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

java开发eclipse常见问题(一)The superclass &quot;javax.servlet.http.HttpServlet&quot; was not found on the Java Build Path

最近刚开始用Eclipse开发,刚开始都是按教程一步一步的新建web工程也没出现什么问题. 今天选了一个新的workspace,建了个web工程发现最简单的jsp页面都报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 百度了下找到原因了,现在总结下,虽然是个简单的问题,但新手肯定会遇到过的. 报错原因是:web工程缺少编译Tomcat运行时相关类,只要加上就行了