在使用JavaEE Eclipse创建动态web项目,server为Tomcat 7.068

描述如下:

在创建jsp页面时,会出现该错误提示[The superclass "javax.servlet.http.HttpServlet" was not found on the Java]

以及自己在编写action类中使用ServletActionContext.getRequest()获得HttpServletRequest对象时也出现错误

[The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files]

解决办法如下:

项目名右击->选择properties->点击左侧的Project Facets->再点击最右侧的Runtimes选择Apache Tomcat -> Apply->刷新项目

The superclass "javax.servlet.http.HttpServlet" was not found on the Java错误

原文地址:https://blog.csdn.net/zhangchao19890805/article/details/50646941

相关文章:

  • 2021-10-24
  • 2021-05-31
  • 2021-06-01
  • 2021-11-04
  • 2021-07-27
  • 2021-06-22
  • 2021-05-13
猜你喜欢
  • 2021-11-08
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案