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 ...
随机推荐
- Entityframework批量删除
UI层 <a href="#" onclick="DelData(0);return false;" id="a_del" class ...
- MySQL 字符集设置
/*************************************************************************** * MySQL 字符集设置 * 说明: * 数 ...
- notebook
1. 2.
- 关于 System.IO.FileAttributes 的 Reparse Points
关于Reparse Points找到下面的解释,要是能有更进一步的解释说明就更好了 Reparse Points其实是一个用户自定义的数据集合,它可以包含在一个文件或目录中.这种格式的数据能够被特定的 ...
- Mysql数据库搭建-Windows
首先先下载一下文件包. 下面这个文件包里面包含了已配置的MySQL5.5和连接器. https://www.dropbox.com/s/iu4ifv0m2232ktn/Win_Mysql5_ODBC. ...
- N Sum
题目:N Sum 描述: Given an array of integers, return indices of the two numbers such that they add up to ...
- AndroidStudio导入Android-PullToRefresh
方法已经写到我的微信公众号中,公众号二维码在下面 本人联系方式: 更多精彩分享,可关注我的微信公众号: 若想给予我分享更多知识的动力,请扫描下面的微信打赏二维码,谢谢!: 微信号:WeixinJung ...
- makefile--目录搜索(八)
在一个较大的工程中,一般会将源代码和二进制文件(.o 文件和可执行文件)安排在不同的目录来进行区分管理.这种情况下,我们可以使用 make 提供的目录搜索依赖文件功能(在指定的若干个目录下自动搜索依赖 ...
- ISBN号码
总时间限制: 1000ms 内存限制: 65536kB 描述 每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括9位数字.1位识别码和3位分隔符,其规定格式如"x-xxx- ...
- linux下重启mysql php nginx
# /etc/init.d/mysql restart # /etc/init.d/php-fpm restart # /etc/init.d/nginx restart