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

时间:2021-08-10 02:33:07

  新项目,新建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

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

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

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

  选择tomcate -> 完成。

新建 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 页面已经正常了。

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