欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

程序员文章站 2022-06-25 20:10:22
MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?...

今天写代码时,发现httpservletresponse response = servletactioncontext.getresponse();这句报红叉,提示the type javax.servlet.http.httpservletresponse cannot be resolved. it is indirectly referenced from required .class files,并要求configuration build path,经过尝试之后,发现解决办法。

错误情况:httpservletresponse response = servletactioncontext.getresponse();这句报红叉

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

提示:the type javax.servlet.http.httpservletresponse cannot be resolved. it is indirectly referenced from required .class files,并要求configuration build path

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

解决办法:点击提示中的configuration build path(或者右键项目,点击build path->configuration build path),打开build path界面后,选择libraries选项卡,并单击add library,如图

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

选择myeclipse libraries,点击next

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

找到java ee 5,点击finish

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

再看代码,红叉已经解决

MyEclipse开发项目时遇到HttpServletResponse报红叉怎么办?

相关标签: 红叉 Myeclipse