首页 > 学院 > 编程设计 > 正文

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

2020-06-27 15:50:47
字体:
来源:转载
供稿:网友

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

 

软件名称:
myeclipse V8.5.0 官方正式版(附注册以及汉化方法)
软件大小:
825MB
更新时间:
2013-03-12

 

错误情况:HttpServletResponse response = ServletActionContext.getResponse();这句报红叉

MyEclipse,红叉

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

MyEclipse,红叉

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

MyEclipse,红叉

选择MyEclipse Libraries,点击Next

MyEclipse,红叉

找到Java EE 5,点击Finish

MyEclipse,红叉

再看代码,红叉已经解决

MyEclipse,红叉


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表