今天在敲代码的时候碰到的一个问题
下面是报错代码:
Multiple annotations found at this line:
- The type javax.servlet.ServletRequest cannot be resolved. It is indirectly
referenced from required .class files
- The method getRequest() from the type PageContext refers to the missing type
ServletRequest
解决方法是引入servlet.spi.jar包
步骤:
项目 右键->Properties->Libraries->Add External JARS-
选择 外部的jsp-api.jar(你的Tomcat安装目录下的lib目录下有)。