EclipseError01

1、错误:“javax.servlet.http.httpservlet was not found on the Java Build Path

  1.1、

  项目上右键-->Build Path --> Configure Build Path --> 点击右边的 ADD Library --> 选中“Server Runtime”,然后 Next --> 选择"Apache Tomcat v7.0",然后Finish

  然后点击上面的“Order and Export”,选中“Apache Tomcat v7.0 [Apache Tomcat v7.0]”,点击“OK”

  1.2、

  从tomcat lib目录下拷贝一个servlet-api.jar的包到“JDK\jre\lib\ext”目录下

  凡是出现找不到包的情况,都可以将找到的包放到JDK\jre\lib\ext下,然后再编译就能够通过。

  ZC: 应该也可以这样:Build Path --> Configure Build Path --> Libraries标签 --> 点击“Add External JARs...” --> 在tomcat目录里面找到servlet-api.jar

2、

3、

4、

5、

 

posted @ 2017-02-21 08:56  JavaSkill  阅读(243)  评论(0编辑  收藏  举报