myeclipse中关于The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

来源:互联网 发布:php flash 编辑:程序博客网 时间:2024/05/09 12:29

      在myeclipse中导入项目,出现报错:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path,先是百度了一番,没有找出所以然。本着不妥协的毅力,然后再google一下,很快地找到解决的方法,这儿不得不说google的强大。

   具体解决方法:

   选择project中的properties,勾选runtimes中的tomcat。如图:

  

    本以为这样就完事了,但还是有个别报错,再继续......

    将tomcat中的servlet-api.jar加到项目中来,大功告成。如图:

     

    

4 0