错误:HttpServlet was not found on the Java

原文地址:http://jingyan.baidu.com/article/f79b7cb34f40569144023ef9.html


我们在用Eclipse进行Java web开发时,可能会出现这样的错误:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path。我们该怎么解决这个问题呢?

工具/原料

  • 电脑
  • Java web的开发环境

方法/步骤

  1. 遇到的错误显示如下:

    错误:HttpServlet was not found on the Java




  2. 右击有错误提示的文件夹,如下:

    错误:HttpServlet was not found on the Java





  3. 点击”配置构建路径“,如下:

    错误:HttpServlet was not found on the Java




  4. 再点击”添加库“,如下:

    错误:HttpServlet was not found on the Java





  5. 选中上图中标出的选项,再点击下一步,如下:

    错误:HttpServlet was not found on the Java





  6. 再点击”完成“,如下:

    错误:HttpServlet was not found on the Java





  7. 再点击”正常“,即可完成设置。这样我的错误就会消失了,如下:

    错误:HttpServlet was not found on the Java


阅读更多
个人分类: Java Web
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭