The method getContextPath() from the type HttpServletRequest refers to the missing type

来源:互联网 发布:ubuntu apt get本地源 编辑:程序博客网 时间:2024/04/29 22:46

出现这种错误,秩序两步就可以解决 

1 右击该项目 - Build Path - Configure Build Path , 在 Libraries 选项下,会发现有个出错的jre Libraries,将其Remove掉。

2 然后右击该项目 - Build Path - Add Library, 选择JRE System Library,选择Workspace defaulr JRE(jdk1.6)(此前JDK已成功安装并配置好), 然后 Finish 。

原创粉丝点击