原因:项目中缺少servlet-api.jar文件。
解决办法:将E: omcatapache-tomcat-6.0.24lib下的servlet-api.jar拷贝到项目中,然后编译即可。(根据自己安装的tomcat地址不同,目录也有所不同)。