首页 > Web开发 > 详细

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

时间:2017-02-23 12:27:02      阅读:492      评论:0      收藏:0      [点我收藏+]

    由于经常在工作室和住处之间用的是不同电脑,今天将一个项目从工作室电脑拷到宿舍之后,将整个项目部署好之后,在每个JSP页面中的"request.getContextPath()"下方出现了红色的波浪线,提示的错误信息是“The method getContextPath() from the type HttpServletRequest refers to the missing type String”,

    此时,解决方式是:

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

    2 然后右击该项目 - Build Path - Add Library, 选择JRE System Library,选择Workspace defaulr JRE(默认的工作JDK), 然后 Finish 。

    这样,JSP页面中的错误提示就消失了。


本文出自 “11828641” 博客,请务必保留此出处http://11838641.blog.51cto.com/11828641/1900389

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

原文:http://11838641.blog.51cto.com/11828641/1900389

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!