问题
将一个项目从一台机器拷到另外一台机器,两台电脑jdk版本不一样
导入项目后,在每个JSP页面都出现了很多红色的波浪线,主要提示的错误信息是
“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,选择你电脑上安装好的jdk 然后 Finish 。
问题基本能解决