Httpservlet cannot be resolved to a type的原因与解决方法
刚开始学习Servlet,在Eclipse中新建了一个Servlet,不过页面上报错:
Httpservlet cannot be resolved to a type,显然是Eclipse找不到相应的包,即javax.servlet。

原因:
jdk 里不包括servlet-api.jar 这个包,此包在Tomcat 中存在
项目名--> 右键
Properties--> 选择
Java Build Path--> 选择
Add External JARs--> 选择
把servlet-api.jar 的路径输入即可

Httpservlet cannot be resolved to a type的原因与解决方法的更多相关文章
- HttpServlet cannot be resolved to a type 解决办法
刚开始学习Servlet,在Eclipse中新建了一个Servlet,不过页面上报错: Httpservlet cannot be resolved to a type,显然是Eclipse找不到相应 ...
- [转]Null value was assigned to a property of primitive type setter of"原因及解决方法
原文地址:http://blog.csdn.net/kevinzhangfei/article/details/6995316 在action请求数据的过程中报出"Null value wa ...
- JSON.NET的Self referencing loop detected with type的原因以及解决办法
模型中有循环引用是很常见的.例如,以下模型显示双向导航属性: : public class Category : { : public Category() : { : Products = new ...
- Null value was assigned to a property of primitive type setter of"原因及解决方法
在action请求数据的过程中报出"Null value was assigned to a property of primitive type setter of"错误,搜索之 ...
- 新建jsp文件,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path错误解决方法
新建一个jsp文件后,有一个错误,The superclass "javax.servlet.http.HttpServlet" was not found on the Java ...
- Httpservlet cannot be resolved to a type
这个问题与上个问题可以说是“错的类似”.解决方案:就是在Tomcat的lib目录下加入servlet-api.jar 即可.
- HttpServlet cannot be resolved to a type解决方法
1:是因为没有加入servlet-api.jar 2:下载网址:http://download.csdn.net/detail/jiuyueguang/5745209 3:然后在项目右键->bu ...
- BASE64Encoder cannot be resolved to a type类似问题的解决办法
我们有时候会碰见在JDK或者其他jar包中提供了某方法或者类,接口,而开发工具仍然报红,无法使用该类或者方法,那是应为我们的编译器没有识别,或者没有支持某些方法或者类 这个时候需要我们手动的开启.具体 ...
- composer 报错:Your requirements could not be resolved to an installable set of packages 解决方法
composer 报错: - Your requirements could not be resolved to an installable set of packages xxxxxxxxxxx ...
随机推荐
- 编程之美2.5:寻找最大的K个数
编程之美2.5:寻找最大的K个数 引申:寻找第k大的数: 方法一: // 选择第k大的数(通过改进快速排序来实现) public static void SelectShort(int[] array ...
- 九、CCAction
之前介绍CCNode的时候说过,动作是指在特定时间内完成移动.缩放.旋转等操作的行为,节点可以通过运行动作来实现动画效果,这里的动作就是指CCAction对象,它有很多的子类,每个子类都封装了不同的动 ...
- python报错
报错1 UnboundLocalError: local variable 'x' referenced before assignment 定义了一个全局参数,但是在函数中直接改变参数值,就会报这个 ...
- javascript 中 typeof 的使用
javascript 中 typeof 的使用 javascript有五种基本的数据类型(简单数据类型),它们分别是:String.Undefined.Null.Boolean和Number.还有一种 ...
- OptionParser
给个例子: from optparse import OptionParser msg_usage = 'usage: %prog [-W] windows size [-H] h island si ...
- (基础篇)PHP字符串函数
1查找字符位置函数: strpos($str,search,[int]):查找search在$str中的第一次位置从int开始: stripos($str,search,[int]):函数返回字符 ...
- HOG 梯度方向直方图简介(转载)
一.基本HOG算法 HOG特征最早出现在SIFT算法中,由于其极强的图像特征描述能力,逐渐被人们熟知和广泛运用,其在目标检测方面表现尤为突出. HOG特征提取过程 步骤一:遍历图像每个像素点,以其为中 ...
- SQLITE 时间字段操作函数
SQLite中的时间日期函数 这是我学习SQLite时做的笔记,参考并翻译了Chris Newman写的<SQLite>中的<Working with Dates and Times ...
- web标准的可用性和可访问性
在Web前端开发界,有三个词经常被提及:可用性(Usability).可访问性(Accessibility)和可维护性(Maintainability). 可用性指的是:产品是否容易上手,用户能否完成 ...
- php使用redis存储
一.Redis扩展模块 # wget https://codeload.github.com/phpredis/phpredis/zip/develop -O phpredis.zip # unzip ...