开发者社区> 问答> 正文

eclipse报错,一直解决不了?报错

The project was not built since its build path is incomplete. Cannot find the class file for javax.servlet.http.httpServletRequest. Fix the build path then try building this project 

<p>
	<span><span style="font-size:14px;line-height:26px;"><br>

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

项目昨天还好着  今天打开已启动就成这样子了,改什么jdk,重新编译啊,都试了没用

展开
收起
爱吃鱼的程序员 2020-06-09 14:33:32 678 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    引用来自“负心杏”的评论

    Thetype  javax.servlet.http.httpServletRequest  cannotberesolved.Itisindirectlyreferencedfromrequired.classfiles

    这个说明:

    1.你的项目是web项目

    2.你的项目的依赖未找到。

    如果是eclipse,加一个targetruntime,就可以了。

    如果是myeclipse,加一个J2EE1.5+ 的自带类库就行。

    操作方式雷同:在项目上右键->buildpath->configbuildpath->addlibrary->

    myeclipse加j2EE,eclipse加serverruntime

    在项目上右键bulidpath试下,看错误就是项目路径错误

    Thetype  javax.servlet.http.httpServletRequest  cannotberesolved.Itisindirectlyreferencedfromrequired.classfiles

    这个说明:

    1.你的项目是web项目

    2.你的项目的依赖未找到。

    如果是eclipse,加一个targetruntime,就可以了。

    如果是myeclipse,加一个J2EE1.5+ 的自带类库就行。

    操作方式雷同:在项目上右键->buildpath->configbuildpath->addlibrary->

    myeclipse加j2EE,eclipse加serverruntime

    你使用了servlet的api但是没有找到jar,maven项目的话配置一下依赖吧,不是的话,配置对应的运行环境的库到buildpath里面
    2020-06-09 14:33:51
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像