环境中File->Project Structure->Modules->Dependences->“+”->Jars or Directories->找到你的tomcat中的lib目录下的Jsp-api.jar和servlet-API.jar添加进来重启IDEA之后就可以了。

环境中File->Project Structure->Modules->Dependences->“+”->Jars or Directories->找到你的tomcat中的lib目录下的Jsp-api.jar和servlet-API.jar添加进来重启IDEA之后就可以了。