eclipse里面request.getParameter()用不了报错,希望看一下是什么问题

img

显示的错误是The method getParameter(String) from the type ServletRequest refers to the missing type String

想问一下这该怎么解决

与这个类似,检查下项目JDK的配置

我没记错的话,好像 getParameter() 这个方法是在后端获取前端传的值的吧?好像是不可以直接在前端这样子使用的。一般在这里的使用场景好像是 request.getContextPath() 这个的