the method getcontextpath() from the type httpservletrequest refers to the missing type string
2017-10-26 14:48
866 查看
在做java项目开发的时候,jsp页面很容易报出这个错误。
错误的原因很多,但是都和JRE有关。
一般在导入项目的时候容易报出这个错误,主要因为JRE(jdk版本不一致)。
解决方法:就是重新配置路径,配置你机器上安装的jdk。
右击该出错项目→ 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页面中的错误提示就消失了。
错误的原因很多,但是都和JRE有关。
一般在导入项目的时候容易报出这个错误,主要因为JRE(jdk版本不一致)。
解决方法:就是重新配置路径,配置你机器上安装的jdk。
右击该出错项目→ 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
- 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
- SSH出错---The method getRealPath(String) from the type ServletRequest is deprecated request.getRealPath("")
- The method contains(CharSequence) from the type String refers to the missing type CharSequence错误解决方法
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误
- The constructor ClassPathXmlApplicationContext(String) refers to the missing type
- The method getServletContext() is undefined for the type HttpServletRequest
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误 .
- 解决The constructor ClassPathXmlApplicationContext(String...) refers to the missing type BeansExc