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

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

 
阅读更多

 

     好久不写Jsp,今天建立了一个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。
order就是使用class的顺序(因为可能出现class同名的情况)
export就是把用到的一些的lib和project同时发布.
分享到:
评论

相关推荐

    eclipse纠错.txt

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

    一个简单的servlet容器

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

    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: ...

    解决butterknife依赖添加报错

    解决Android studio 添加butterknife依赖,运行报错。

    JavaWeb仿小米在线商城ShoppingMall

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

    Java web项目 常见问题汇总

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

    JSP Simple Examples

    Jsp comments are converted by the jsp engine into java comments in the source code of the servlet that implements the Jsp page. Html tag inside out implicit object In this program we are going to ...

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

    java反射.ppt

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

    The method of type must override a superclass method解决方式, myeclipse, java, web

    NULL 博文链接:https://thaipine.iteye.com/blog/2354220

    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解惑(谜题)CHM中英文双版本

    Java谜题 Java谜题1——表达式谜题 谜题1:奇数性 谜题2:找零时刻 谜题3:长整除 谜题4:初级问题 谜题5:十六进制的趣事 谜题6:多重转型 谜题7:互换内容 谜题8:Dos Equis 谜题9:半斤 谜题10:八两 ...

    Java 高级特性.doc

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

    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, ...

    android @override 报错解决方案

    现象: … java: 1801: method does not override a method from its superclass @Override… 原因: Eclipse is defaulting to Java 1.5 and you have classes implementing interface methods (which in Java 1.6 ...

    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

    JAVA白皮书(英文版)

    1. Introduction to 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 ...

    ext-2.3.0+CKEditor 3.0.1+ckfinder_asp_1.4配置详解及工程源码

    Ext.form.CKEditor.superclass.constructor.call(this, config); }; Ext.extend(Ext.form.CKEditor, Ext.form.TextArea, { onRender : function(ct, position){ if(!this.el){ this.defaultAutoCreate = { tag...

    Java2核心技术卷I+卷2:基础知识(第8版) 代码

    Object: The Cosmic Superclass 192 Generic Array Lists 204 Object Wrappers and Autoboxing 211 Methods with a Variable Number of Parameters 214 Enumeration Classes 215 Reflection 217 Design Hints ...

Global site tag (gtag.js) - Google Analytics