HttpServletRequest cannot be resolved to a type

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

解决办法:

这是因为项目中缺少两个包 Jsp-api与servlet-api 包  在tomcat的安装文件中可以找到,导入到项目中即可:

在项目的中导入tomcat中的这两个包

如果还报错误那可能是项目中没有导入jdk包 导入即可解决

HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的更多相关文章

  1. 【明哥报错簿】之【 "javax.servlet.http.HttpServlet" was not found on the Java Build Path || HttpServletRequest/HttpServletResponse cannot be resolved to a type】

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

  2. Description Resource Path Location Type The superclass "javax.servlet.http.HttpServlet" was not foun

    一段时间没亲自建新项目玩乐,今天建立了一Maven project的时候发现了以下异常,Description Resource Path Location Type The superclass & ...

  3. (转载)(DescriptionResource Path Location Type The superclass "javax.servlet.http.HttpServlet" was not foun

    eclipse环境下如何配置tomcat 打开Eclipse,单击"Window"菜单,选择下方的"Preferences". 单击"Server&q ...

  4. HttpServletRequest cannot be resolved to a type。

    问题描述:HttpServletRequest cannot be resolved to a type.Multiple markers at this line - The import java ...

  5. eclipse中 报出The type javax.servlet.http.HttpServlet cannot be resolved. It is indirect错误

    在Myeclispe部署项目后 报错 The type javax.servlet.http.HttpServlet cannot be resolved. It is indirect错误 如果在M ...

  6. maven项目使用SOLR时报 previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest" 错的解决方法

    环境:Apache solr4.8,maven3,IntellijIDEA 想在项目中使用solr 在pom.xml文件中添加了solr的依赖 solr-core,solrj 和solr-dataim ...

  7. The type javax.servlet.http.HttpServletRequest cannot be resolved.

    The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from ...

  8. javax.servlet.jsp.JspException cannot be resolved to a type 和 javax.servlet.jsp.PageContext cannot be resolved to a type 解决办法

    今天我从码云上拉一个项目下来,是个maven项目,闲来无事自己研究研究,发现刚拉下来,项目就有报错,我一看是httpServletRequest cannot be resolved to a typ ...

  9. The import javax.servlet.http.HttpServletRequest cannot be resolved

    Error: The import javax.servlet cannot be resolved The import javax.servlet.http.HttpServletRequest ...

随机推荐

  1. 学习Spring.Net_1

    Spring.Net是一个轻量级的控制反转(IoC)和面向切面编程(AOP)技术的容器框架  一.控制反转(Inversion of Control,IoC),也叫依赖注入(Dependency In ...

  2. 设置checkbox只读

    1.checkbox没有readonly属性,所以在checkbox添加readonly属性是没有作用的. <input type="checkbox" readonly=& ...

  3. 树莓派WLAN连接PC(不通过路由器)

    上一篇博文捣鼓了一下树莓派直连线连接PC.吃完午饭心血来潮,树莓派既然能用直连线连接PC,曾经也试过拿PC当作热点,为何不尝试一下用WLAN将树莓派与PC互连呢?果断搞起. 首先,我当前笔记本是用WL ...

  4. jQueryMobile(三)

    五].jQueryMobile工具栏 头部.尾部的定位:data-position='inline' 默认data-position='fixed' 固定在头部/尾部data-fullscreen=' ...

  5. Eclipse plug-in startup

    Plug-in Startup !SESSION 2013-09-02 16:28:29.546 -----------------------------------------------ecli ...

  6. c语言函数指针的几种使用方式

    1.直接定义函数指针赋值并使用. #include <stdio.h> int max(int x, int y) { if (x > y) return x; else retur ...

  7. centos7.4 系统安装指导

    centos7 系统安装指导 安装前规划 下载安装文件 安装过程设置 安装后系统基本设置 安装前规划 CentOS 7.x系列只有64位系统,没有32位. 生产服务器建议安装CentOS-7-x86_ ...

  8. PHP 简单调用rest WebServices

    <?php $ch = curl_init("http://api.cachk.com:8185/Tech-Trans.esPOS4.PosService.UAT/rest/enqui ...

  9. react+webpack 引入字体图标

    在使用react+webpack 构建项目过程中免不了要用到字体图标,在引入过程中报错,不能识别字体图标文件中的@符,报错 Uncaught Error: Module parse failed: U ...

  10. PDO链式操作——针对关键字出现问题的解决方案

    例如: 1.执行一条SQL语句:查询user表中的所有数据,并通过name字段进行降序,通过age进行升序 2. 案例1:   正确的执行语句为:SELECT * FROM user ORDER BY ...