问题描述:
HttpServletRequest cannot be resolved to a type。
Multiple markers at this line
- The import javax.servlet.http cannot be resolved
- The import javax.servlet.http cannot be resolved
- The import javax.servlet.http cannot be resolved
解决方案:
1.这个错误可能是服务器自带的servlet库未导入的原因。
2.右键项目属性,转到Targeted Runtimes,选择一个服务器,例如Tomcat,单击应用,可能就可以解决。
3.或者一开始建立项目就如下Targeted Runtimes


  
												

HttpServletRequest cannot be resolved to a type。的更多相关文章

  1. HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet& ...

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

  3. maven中解决javax.servlet.jsp.PageContext cannot be resolved to a type

    在eclipse环境下用maven出现:javax.servlet.jsp.PageContext cannot be resolved to a type. 这是由于没有引入jsp-api引发的问题 ...

  4. number (2)编译错 (类的大小写错误) Filewriter cannot be resolved to a type

    没找到所使用的类所在的类定义,一般常见于使用了外部jar中的类,但有对应的import语句.比如,如果程序中使用了ArrayList这个类,但你程序类文件的最开始import部分如果没有import  ...

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

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

  6. eclipse报错:Multiple annotations found at this line: - String cannot be resolved to a type解决方法实测

    Multiple annotations found at this line:- String cannot be resolved to a type- The method getContext ...

  7. ImageView cannot be resolved to a type

    问题: ImageView cannot be resolved to a type 报这样的错误是没有加载MainActivity.java文件中加入 import android.widget.I ...

  8. myeclipse 开发环境下,提示 String cannot be resolved to a type

    从SVN上下载项目,所有代码都有下来,在本地编译,java类总是报出n多红叉,惨不忍睹,String cannot be resolved to a type都出来了,以为是jar包未被加载,于是pr ...

  9. Eclipse “cannot be resolved to a type” 错误

    eclipse中遇到了“XX cannot be resolved to a type”的报错信息.网上找了些资料,本文将做以简单总结.     (1)jdk不匹配(或不存在) 项目指定的jdk为“j ...

随机推荐

  1. MySQL 配置文件my.cnf

    转载: MySQL配置文件my.cnf 详解:#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM ...

  2. vue2 vue-router 组装

    适用于vue cli搭建的项目 vue-router模块下载及记录到package.json中: npm i vue-router -D main.js中: import VueRouter from ...

  3. python的time模块常用内置函数

    1.Python time time()方法 Python time time() 返回当前时间的时间戳(1970纪元后经过的浮点秒数). time()方法语法: time.time() 举例: #! ...

  4. ContentResolver,ContentProvider,ContentObserver使用记录

    版权声明:本文出自汪磊的博客,转载请务必注明出处. 本篇博客只是记录一下ContentProvider的使用(这部分工作中用的比较少总是忘记),没有太深入研究.已经熟练掌握使用方式,想深入了解内部机制 ...

  5. opensuse安装pycurl失败记录

    早上在opensuse安装pycurl,一直出现如下错误: pepper@VM_56_243_suse:~/code/gitosis-autotest> pip install pycurl C ...

  6. jQuery 入门

    不能正常引用jQuery-2.2.4.min.js所以代码没生效 jQuery 是一个 JavaScript 函数库.jQuery 库包含以下特性: HTML 元素选取 HTML 元素操作 CSS 操 ...

  7. TCP网络编程-----客户端请求连接服务器、向服务器发数据、从服务器接收数据、关闭连接

    SOCKET m_sockClient; unsigned short portNum; ------------------------------------------------------- ...

  8. ppt的那些小事(一)

    根据应用场景不同,幻灯片可以分为两大类,演讲型和阅读型 模板资源:(免费) OfficePLUS,微软Office官方在线模板网站!http://www.officeplus.cn/Template/ ...

  9. python3之模块collections

    1.计数器(counter) counter是对字典的方法,用来追踪值的出现次数:具备字典的所有功能和自己的功能. >>> from collections import Count ...

  10. Jerry 2017年的五一小长假:8种经典排序算法的ABAP实现

    2017年4月29日~5月1日,国际劳动节, 三天的小长假. 在国内,小长假往往是这样的: 然而我当时在戏称为"德村"(德国农村)的Walldorf出差并且住在Wiesloch, ...