工程名右键-->build path-->configurebuild path-->Libraries-->Add external jars-->在tomcat路径下的lib里有servelet-api.jar包选中导入即可。