您的位置:首页 > 编程语言 > Java开发

Caused by: java.lang.Error: Unresolved compilation problems:解决办法

2016-06-06 09:50 701 查看
错误信息(我的错误类似,网络copy):

java.lang.Error: Unresolved compilation problems: 
The import javax.servlet.ServletContext cannot be resolved
The import javax.servlet.http.HttpSession cannot be resolved
The import javax.servlet.http.HttpSessionEvent cannot be resolved
The import javax.servlet.http.HttpSessionListener cannot be resolved
HttpSessionListener cannot be resolved to a type
ServletContext cannot be resolved to a type
HttpSessionEvent cannot be resolved to a type
HttpSession cannot be resolved to a type
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
context cannot be resolved
HttpSessionEvent cannot be resolved to a type
HttpSession cannot be resolved to a type



解决办法:
   
原因有很多,解决办法也很多,参考地址:
        http://www.360doc.com/content/12/1015/17/4152160_241639166.shtml
        http://blog.csdn.net/chl033/article/details/4744601
    我的解决办法:
        修改eclipse配置:Properties-->Java Compiler--> Compiler compliance level 为你使用的jdk版本(我的是1.7)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息