首页 > 代码库 > 新建 jsp异常,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

新建 jsp异常,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

  新项目,新建jsp页面的时候报异常:

Multiple annotations found at this line:    - The superclass "javax.servlet.http.HttpServlet" was      not found on the Java Build Path    - The superclass "javax.servlet.http.HttpServlet" was      not found on the Java Build Path

技术分享

  右击项目 -> Properties -> Java Build Path -> Libraries 选项 -> 点击 Add Library -> Server Runtime

技术分享

  选择tomcate -> 完成。

技术分享

  如下:

技术分享

  再看jsp 页面已经正常了。

技术分享

 

新建 jsp异常,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path