今天新拉下来一个项目 然后部署 不属后jsp报错
String cannot be resolved to a type - The method getContextPath() from the type HttpServletRequest refers to the missing type
处理方式:引起这个问题是导入包之后jre没有配置重新配置jre 或者jdk 之后我的问题就解决了。
到 libraries 下的 jre System Library 右键 ->build Path -> configure build Path -> 选中jre System Library
点击edit 在 Alternate JRE 那里选择jdk 点击finish ,问题解决了。