本文介绍了超类“javax.servlet.http.HttpServlet"在 Java 构建路径上找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个通过 Maven 集成在 Eclipse 中创建的项目.一切正常,但在所有 JSP 文件的工作空间中都有这个:
I have a project created by Maven integration in Eclipse. All work fine, but in the work space in all JSP files have this:
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
到第一个字符串 where place:
To the first string where place:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
当我创建一个基本的动态 Web 项目和 JSP 时 - 一切正常,没有错误.
When I create a basic dynamic web project and JSP in - all is fine, no errors.
推荐答案
首先添加运行时并选择项目属性.然后从运行时"选项卡中检查服务器名称,如图所示.
Add a runtime first and select project properties. Then check the server name from the 'Runtimes' tab as shown in the image.
这篇关于超类“javax.servlet.http.HttpServlet"在 Java 构建路径上找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!