JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误
2011-03-02 13:09
615 查看
今天我将一个项目从另一台机器拷到这台机器,又重新安装了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页面中的错误提示就消失了。
我将整个项目部署好之后,在每个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页面中的错误提示就消失了。
相关文章推荐
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误 .
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String
- the method getcontextpath() from the type httpservletrequest refers to the missing type string
- jsp页面出现“String cannot be resolved to a 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 constructor ClassPathXmlApplicationContext(String) refers to the missing type
- The method contains(CharSequence) from the type String refers to the missing type CharSequence错误解决方法
- 解决The constructor ClassPathXmlApplicationContext(String...) refers to the missing type BeansExc
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method contains(CharSequence) from the type String refers to the missing type CharSequence错误解决方法
- 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
- jsp页面出现“String cannot be resolved to a type”错误解决办法
- jsp页面出现“String cannot be resolved to a type”错误解决办法