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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The method getContextPath() from the type HttpServletRequest refers to the missing type相关的知识,希望对你有一定的参考价值。

    由于经常在工作室和住处之间用的是不同电脑,今天将一个项目从工作室电脑拷到宿舍之后,将整个项目部署好之后,在每个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的主要内容,如果未能解决你的问题,请参考以下文章

The parameter to the method is the basic data type

The method Inflate() in android

Jquery ajax get request to aspx web method not hit the breakpoint in the method and error is json pa

the construction method (构造方法)

The server requested authentication method unknown to the client

[Vue warn]: Method “components“ has type “object“ in the component definition. Did you reference the