HttpServletRequest cannot be resolved to a type。
Posted 一只猫的旅行
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HttpServletRequest cannot be resolved to a type。相关的知识,希望对你有一定的参考价值。
问题描述:
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。的主要内容,如果未能解决你的问题,请参考以下文章
The import javax.servlet.http.HttpServletRequest cannot be resolved
ERROR:The type javax.servlet.http.HttpServletRequest cannot be resolved.
The type javax.servlet.http.HttpServletRequest cannot be resolved.的解决方法
项目导入时报错:The import javax.servlet.http.HttpServletRequest cannot be resolved
项目导入时报错:The import javax.servlet.http.HttpServletRequest cannot be resolved
Eclipse中导入外部项目时提示HttpServletRequest(import javax.servlet cannot be resolved) 不能引用的问题