`
weigang.gao
  • 浏览: 470237 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build

 
阅读更多
     今天建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat。原本开心的新建jsp页面,添加一个简单的Java类。可是,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。
分享到:
评论

相关推荐

    一个简单的servlet容器

    [深入剖析Tomcat]一书第二章中 一个简单的servlet容器实现

    eclipse纠错.txt

    EClipse:web项目中某一.jps页面忽然出现错误,鼠标点上去为:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path. 一招解决!

    Java web项目 常见问题汇总

    汇总一、网页报‘404’错误二、网页报‘500’错误三、项目中Error Pages错误四、导入的项目出现乱码五、报错 HttpServletRequest 无法解析为类型 或者 The superclass “javax.servlet.http.HttpServlet”...

    JSP Simple Examples

    One of the strong features of java is that it is follows a OOPs concept, and one of the feature of OOP in java is that, we can assign a subclass object or variable to the variable of the superclass ...

    java.核心技术.第八版 卷1

    The following is the table of contents for the eighth edition, not yet shown on the product page at the time I am writing this: Chapter 1: An Introduction to Java 1 Java As a Programming Platform ...

    JavaWeb仿小米在线商城ShoppingMall

    JavaWeb在线商城开发知识总结(java+jsp+servlet+MySQL+jdbc+css+js+jQuery) 可以实现浏览商品,查看商品详情,添加购物车,计算价格等功能 项目文章:...

    Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm

    Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm,英文版本,chm 格式,大小 1 Mb,作者:Joshua Bloch、Neal Gafter。 内容预览: Chapter 1. Introduction Chapter 2. Expressive Puzzlers Puzzle 1: ...

    JAVA白皮书(英文版)

    1.1Beginnings of the Java Language Project 1.2Design Goals of Java 1.2.1Simple, Object Oriented, and Familiar 1.2.2Robust and Secure 1.2.3Architecture Neutral and Portable 1.2.4High ...

    Java 高级特性.doc

    JAVA高级特性 1.静态导入:先举个离例子 。 import java.lang.Integer.parseInt; public class StaticImport { int x = parseInt("123"); System.out.println(x); } 这样的程序如果不在IDE 工具中输入,是很难...

    SSD7 选择题。Multiple-Choice

    (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have...

    Java Interview Guide.epub

    The Object Superclass? Composition & Inheritance? Abstract Classes & Interfaces? Exceptions? Generics? Concurrency? Memory Management? Java Database Connectivity? Web Applications? Web Services? ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Do not depend on the symbol being brought in transitively via headers not directly included. One exception is if Foo is used in myfile.cc, it's ok to #include (or forward-declare) Foo in myfile.h, ...

    Test_invoke_super_range.rar_Superclass

    title invoke method of superclass.

    corejava培训文档

    7.2.2. 父类(SuperClass)和 子类(SubClass)的关系 7.2.3. 系统构造一个对象的顺序 7.3. 多态(polymorphism) 7.3.1. 方法的覆盖(overridding) 7.3.2. 多态的分类 7.3.3. 运行时多态的三原则 7.3.4. ...

    java反射.ppt

    每当一個类被载入时,JVM就自动为其生成一个Class对象,通过操作class对象,我们可以得到该对象的所有成员并操作它们 public ... System.out.println("SuperClass: "+ stringClass.getSuperclass().getName()); } }

    Python Cookbook, 2nd Edition

    Sorting Keys or Indices Basedon the Corresponding Values Recipe 5.5. Sorting Strings with Embedded Numbers Recipe 5.6. Processing All of a List's Items in Random Order Recipe 5.7. Keeping a ...

    Java高级程序设计实战教程第三章-Java反射机制.pptx

    Java高级程序设计 第3章 Java反射机制 3.1 应用场景 3.2 相关知识3.3 实施过程 3.4 拓展知识3.5 拓展训练 3.6 课后小结3.7 课后习题 3.8 上机实训 Java高级程序设计实战教程第三章-Java反射机制全文共15页,当前为第...

    Java核心技术编程第8版(英文版)

    Chapter 1: An Introduction to Java 1 Java As a Programming Platform 2 The Java “White Paper” Buzzwords 2 Java Applets and the Internet 7 ...Object: The Cosmic Superclass 192 Generic Array Lists 204

Global site tag (gtag.js) - Google Analytics