Error:java: 无法访问javax.servlet.Servlet 找不到javax.servlet.Servlet的类文件 原因:没有在Modules中引入Tomcat 添加tomcat就好了。