加入相關類的 jar 包到你的 classpath (右鍵點擊某個jar包--build path--config build path...---liberary---Add external jar library),此處加入 servelet-api.jar(此包在eclipse/plugins目錄中能夠找獲得,或者在tomcat 中其餘相似的錯誤也用相同的方法解決) 到 classpath ,OK 。api