当前位置: 代码迷 >> 综合 >> JavaWeb报错:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path
  详细解决方案

JavaWeb报错:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

热度:27   发布时间:2023-12-18 00:59:29.0

新建一个JSP页面时,<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>报错,光标移上去显示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。

上网搜了一下解决办法:

右击web项目,找到Build Path,选择Configure Build Path进入Java Build Path,选择 Libraries-->Add Libraries-->Server Runtime-->next,选择tomcat就OK了。


  相关解决方案