Access restriction: The type HttpServlet is not accessible due to restriction on required library xxxx\servlet-api.jar

在Eclipse是新建一个Servlet文件, 报错

Access restriction: The type HttpServlet is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_02\jre\lib\ext\servlet-api.jar

 

解决方法

把C:\Program Files\Java\jdk1.6.0_02\jre\lib\ext\servlet-api.jar 拷贝到项目的 lib下就没报错了。

posted @ 2013-05-18 17:15  吴永富  阅读(817)  评论(0编辑  收藏  举报