Idea导入项目出现Cannot resolve symbol 'HttpServlet'错误:

Idea报错Cannot resolve symbol

1、File->Settings->Application Servers->+ Tomcat Server->选择tomcat->OK

Idea报错Cannot resolve symbol

2、右键项目选择Open Module Setting->

Idea报错Cannot resolve symbol

选择Global Libraries->+->Java->

Idea报错Cannot resolve symbol

进入刚才设置的Tomcat目录选择lib下的servlet-api.jar,

Idea报错Cannot resolve symbol

 

Idea报错Cannot resolve symbol