Idea报错Cannot resolve symbol 'HttpServlet'

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

eclipse导入项目此类报错参考:https://blog.csdn.net/lihua5419/article/details/94742369

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

Idea报错Cannot resolve symbol 'HttpServlet'_第1张图片

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

Idea报错Cannot resolve symbol 'HttpServlet'_第2张图片

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

Idea报错Cannot resolve symbol 'HttpServlet'_第3张图片

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

Idea报错Cannot resolve symbol 'HttpServlet'_第4张图片

 

Idea报错Cannot resolve symbol 'HttpServlet'_第5张图片

 

你可能感兴趣的:(IDEA)