1.配置环境,java/ext/servlet.api 存在于环境中,但eclipse提示着没有API,解决方法
方法一:
右键工程->Preferences ->java builder path->Libraries->将JRE System Library 给remove->add Library->Server Runtime->Apache Tomcat v7.0->Finish;
方法二:
Eclipse 默认把这些受访问限制的API设成了ERROR。 Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning