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错误

如果在MyEclipse中遇到这种情况,也就是HttpServletRequest报红叉的时候,这样做1、右键工程找到build path项2、找到Add Libraries3、点击myEclipse Libraries,Next4、添加JavaEE 5OK
时间: 2024-10-20 23:31:09

eclipse中 报出The type javax.servlet.http.HttpServlet cannot be resolved. It is indirect错误的相关文章

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

The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files   是缺少serverlet的引用库,解决如下 1.工程右键-properties->java build path 2.在java build path的libraries tab页中选择Add external Jars...按钮 3. 选择eclip

Java异常The type javax.servlet.http.HttpServletRequest cannot be resolved

The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files. 这个错误表示的意思还不太清楚,可能是,myeclipse不会自动找这个包servlet.jar,就算在相应工程/WebRoot/WEB-INF/lib里面,而且奇怪的是该错误提示总是在代码的最前面 ( 第一行位置 ) 解决办法:加入相关类的 jar 包到

The type javax.servlet.http.HttpServletRequest cannot be resolved.的解决方法

Bug的描述 The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files 解决方法 是缺少serverlet的引用库,解决如下 1.工程右键-properties->java build path 2.在java build path的libraries tab页中选择Add external Jars...按钮

ERROR:The type javax.servlet.http.HttpServletRequest cannot be resolved.

MyEclipse中附加工程出现如下错误:The type javax.servlet.http.HttpServletRequest cannot be resolved.  解决方法如下: (1)右键工程找到build path项 (2)找到Add Libraries (3)点击myEclipse Libraries,Next (4)添加JavaEE 5

java开发eclipse常见问题(一)The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

最近刚开始用Eclipse开发,刚开始都是按教程一步一步的新建web工程也没出现什么问题. 今天选了一个新的workspace,建了个web工程发现最简单的jsp页面都报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 百度了下找到原因了,现在总结下,虽然是个简单的问题,但新手肯定会遇到过的. 报错原因是:web工程缺少编译Tomcat运行时相关类,只要加上就行了

关于jsp页面中:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path异常信息解决

1.异常信息截图 2.异常发生的原因: 在java的构建环境中没有找到父类:javax.servlet.http.HttpServlet这个类.我们得知这个类所需要的jar包为servlet.jar.我们将该jar包加入到java构建路径中即可.因为该jar包在tomcat下.所以我们只需要将tomcat总体加入到java运行环境中即可 具体步骤如下: 原文地址:https://www.cnblogs.com/aeon/p/9744632.html

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

我的方法:是缺少servlet的引用库,解决如下 1.工程右键-properties->java build path 2.在java build path的libraries tab页中选择Add external Jars...按钮.server runtime -->next--->选择你要选用的tomcat即可问题解决了.网上别的方法(我没有尝试过): 1.工程右键-properties->java build path 2.在java build path的librari

eclipse更改workspace中出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java----问题》》

第一步:那是因为在项目中没有告诉它应该在哪个tomcat中运行,右击项目名称----->build path-->configure   path---->library------>add   library------->server  runtime----->添加一个tomcat即可 具体详情可·参照http://jingyan.baidu.com/article/f79b7cb34f40569144023ef9.html 第二步:如果在server   run

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

原因:项目中缺少servlet-api.jar文件. 解决办法:将D:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib下的servlet-api.jar拷贝到项目中,然后编译即可.