最近刚开始用Eclipse开发,刚开始都是按教程一步一步的新建web工程也没出现什么问题。

今天选了一个新的workspace,建了个web工程发现最简单的jsp页面都报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

百度了下找到原因了,现在总结下,虽然是个简单的问题,但新手肯定会遇到过的。

报错原因是:web工程缺少编译Tomcat运行时相关类,只要加上就行了。

1、选择项目右击或 Build Path- Configure Build Path -Libraries- Add Libraries

2、在弹出框中选中Server Runtime—Next—Apache-Tomcatv7.0—Finish

3、再回到刚刚的窗口选择Order and Export—选中你刚刚添加的Apache-Tomcatv7.0

4、重新打开页面,问题解决。

java开发eclipse常见问题(一)The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的更多相关文章

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

  2. Eclipse错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    该报错是由于缺少servlet-api.jar造成的,将servlet-api.jar复制到项目下的WEB-INF/lib目录下即可 servlet-api.jar在tomcat的lib目录下有,可以 ...

  3. Eclipse: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 t ...

  4. eclipse 中新建文件报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Buil

    在eclipse中新建文件报错错误提示如下: The superclass "javax.servlet.http.HttpServlet" was not found on th ...

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

  6. java eclipse maven The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方法

    在eclipse 中使用maven 创建java web项目,启动服务器遇到提示:The superclass "javax.servlet.http.HttpServlet" w ...

  7. 新建maven指定jdk版本-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.Http ...

  8. [Eclipse]--Error:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path.

    一段时间没用eclipse后,再去打开以前的项目,发现一打开前线标红.查看错误的时候,如下图所示: Error:The superclass "javax.servlet.http.Http ...

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

随机推荐

  1. 格子布局 js

    <!doctype html> <html> <head> <meta charset="UTF-8" /> <title&g ...

  2. c# 计算1-100之间的所有质数(素数)的和

    求1-100之间的所有质数(素数)的和: 所以先必须知道什么是质数? 一个数是不是素数   “素数”是指除了能被1和自身整除外,不能被任何其它整数整除的自然数. 然后知道有哪些是质数: 记忆的方法: ...

  3. ZOJ Problem Set - 3865 Superbot (bfs)

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5477 大牛博客:http://www.cnblogs.com/kylehz/p ...

  4. C# treeview控件部分节点添加checkbox

    一.先初始化treeview this.treeView1.CheckBoxes = true; this.treeView1.ShowLines = false; this.treeView1.Dr ...

  5. HibernateTools实现pojo类 数据库schma mapping映射的相互转换

    核心 利用HibernateTools,从POJO类,Mapping映射文件,数据库表有其中的一项,就能生成其他两项. 概述 在使用Hibernate开发系统持久层时,按照一般开发流程 1.分析业务 ...

  6. Hibernate HQL注入攻击入门

    SQL注入是一种大家非常熟悉的攻击方式,目前网络上有大量存在注入漏洞的DBMS(如MySQL,Oracle,MSSQL等).但是,我在网络上找不到针对Hibernate查询语言的相关资源.因此本文总结 ...

  7. 在tomcat目录下启动tomcat,可以正常访问tomcat主页,然在在eclipse中集成了tomcat却访问不了tomcat主页,却能访问发布的项目

    tomcat server在eclipse中正常配置了,在eclipse建tomcat服务是在server 视图那里new server建立的,但把项目部署到tomcat后却发现tomcat主页报40 ...

  8. 在单机Hadoop上面增加Slave

    之前的文章已经介绍了搭建单机Hadoop, HBase, Hive, Spark的方式:link 现在希望在单机的基础上,加一个slave. 首先需要加上信任关系,加信任关系的方式,见前一篇文章:li ...

  9. XML文件读取工具类

    /// <summary> /// Author: jiangxiaoqiang /// </summary> public class XmlReader { //===== ...

  10. 850 USB 烧录模式

    /************************************************************************* * 850 USB 烧录模式 * 说明: * 本文 ...