The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files

问题原因:

项目中缺少jar包:servlet-api.jar

解决办法:

方法1:把 servlet-api.jar 添加到项目中(该jar包在Tomcat目录的lib文件夹下)

方法2:项目中添加Server Library(Apache Tomcat  ...)

原文地址:https://www.cnblogs.com/Amos-Turing/p/7919566.html