The method getContextPath() from the type HttpServletRequest refers to the missing type
2017-04-08 15:15
585 查看
今天我将一个项目从另一台机器拷到这台机器,又重新安装了JDK1.6(这台机器上原先的JDK是1.5的),并配置好了JDK环境后,我将整个项目部署好之后,在每个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(jdk1.6)(此前JDK已成功安装并配置好), 然后 Finish 。
这样,JSP页面中的错误提示就消失了。
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(jdk1.6)(此前JDK已成功安装并配置好), 然后 Finish 。
这样,JSP页面中的错误提示就消失了。
相关文章推荐
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- the method getcontextpath() from the type httpservletrequest refers to the missing type string
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- String cannot be resolved to a type - The method getContextPath() from the type HttpServletRequest r
- The method getContextPath() from the type HttpServletRequest
- - String cannot be resolved to a type - The method getServerName() from the type ServletRequest
- The method getServletContext() is undefined for the type HttpServletRequest
- SSH出错---The method getRealPath(String) from the type ServletRequest is deprecated request.getRealPath("")
- The method getServletContext() is undefined for the type HttpServletRequest
- jsp The method getDispatcherType() is undefined for the type HttpServletRequest
- The method getDispatcherType() is undefined for the type HttpServletRequest
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误
- Spring找不到方法:The method getDispatcherType() is undefined for the type HttpServletRequest
- 日常问题记录--访问JSP文件时The method getDispatcherType() is undefined for the type HttpServletRequest