我使用的是tomcat,需要引入Tomcat运行时相关类 下面是具体的解决方法: 右击web工程-》属性或Build Path-》Java Build Path->Libraries-> Add Libray...->Server Runtime -》Tomcat Server更详细图形参考:https://yq.aliyun.com/articles/638206