在使用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->刷新项目

原文地址:https://blog.youkuaiyun.com/zhangchao19890805/article/details/50646941
本文介绍在Java EE Eclipse环境下使用Tomcat7.0创建动态Web项目时遇到的问题及解决方法,包括创建jsp页面时出现的错误提示以及在action类中使用ServletActionContext.getRequest()获取HttpServletRequest对象时出现的错误。
1664

被折叠的 条评论
为什么被折叠?



