在eclipse中,编写servlet时,不能导入 HttpServlet 解决方法为:在build path中将 servlet-api.jar 导入即可。(servlet-api.jar在tomcat中的lib目录下)