1.右键点击项目,打开open module settings 
2.选择Libraries 
3.选择中间+号,点击java,然后选择tomcat/lib/servlet-api.jar 
4.点击apply,确定 这个错误就会自动消失。

相关文章: