开发者社区 问答 正文

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 707 分享 版权
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
    赞同 展开评论
问答分类:
问答标签:
问答地址: