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

jsp The method getServletContext() is undefined for the type in eclipse解决方法

2015-07-06 18:05 821 查看


jsp The method getServletContext() is undefined for the type in eclipse解决方法

2014-07-14 07:40:55CSDN-BEIDOUJS-点击数:1003



getServletContext()这个方法在Servlet 3.0规范里才有,要tomcat7才行。

如果使用的tomact6.0就会报这个错,必须增加一个extended Servlet,方法如下:

File->Properties -> Java Build Path -> Libraries -> Add Library -> Server Runtime
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: