JSP文件中的Eclipse错误:超类"javax.servlet.http.HttpServlet"在Java构建路径中找不到 [英] Eclipse error in JSP file: The superclass "javax.servlet.http.HttpServlet" was not found on the java build path

查看:133
本文介绍了JSP文件中的Eclipse错误:超类"javax.servlet.http.HttpServlet"在Java构建路径中找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经进行了一段时间的研究,但在我的JSP文件中没有找到任何问题的答案...我的意思是,它可以工作,但是eclipse在第一行指出了一个错误

I've done a research for a while and I haven't found any answer to an issue on my JSP file... I mean, it works but eclipse points out an error on the first line saying that

超类"javax.servlet.http.HttpServlet"在Java构建路径中找不到

The superclass "javax.servlet.http.HttpServlet" was not found on the java build path

这是文件的样子

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
   <p>Hello world</p>
</body>
</html>

运行时服务器设置在apache 10.0上,构建路径具有apache lib链接...而且我的servlet类在jakarta导入下运行良好...整个想法可行,问题在于Eclipse显示了该错误第一行,应该从现在开始从雅加达导入,并且现在不应该以某种方式影响此错误,因为它现在不会影响代码.

Runtime server is set on apache 10.0, the build path has the apache lib linked... And my servlet class is working fine with jakarta imports... The whole think works, the problem is just that Eclipse shows that error on the first line, when it should since the import now is done from jakarta, and I don't know if somehow this error that at this point does not affect the code, can affect on a bad way later on.

谢谢.

  [1]: https://prnt.sc/10lo0al
  [2]: http://prntscr.com/10lo2b2
  [3]: http://prntscr.com/10lo337
  [4]: http://prntscr.com/10lo3kh
  [Apache lib folder][1]
  [jsp file error][2]
  [targeted runtime checked][3]
  [apache lib][4]

推荐答案

应该使用星期三发布的2021-03版本的更新来解决此问题,方法是使用

It should be resolved with an update to the 2021-03 release on Wednesday, using https://download.eclipse.org/releases/2021-03 .

这篇关于JSP文件中的Eclipse错误:超类"javax.servlet.http.HttpServlet"在Java构建路径中找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆