eclipse报the quick fix could not resolve the error错误的解决方法

来源:互联网 发布:matlab怎么遍历数组 编辑:程序博客网 时间:2024/06/06 02:19

错误原因:can not implement the missing methods,either due to compile errors or the projects build path does not resolve all dependencies   翻译:不能实现丢失的方法,或许是因为编译错误或者工程创建的路径不能解决所有依赖;

在项目中需要使用struts2,由于需要获取session,所以需要实现ServletRequestAware,可是在实现其方法时总是弹出上面的错误提示;

错误根源:缺少Servlet相关的jar包了,这里是servlet-api.jar

解决办法:添加servlet-api.jar。

这个jar包可以在tomcat的lib目录下找到,复制到你的项目中WEB-INF下的lib文件夹去就可以了。

0
0 0
原创粉丝点击