问题1:Maven-war项目中的jsp标签开始存在红叉且错误信息为:The superclass "javax.servlet.http.HttpServlet" was not found on
2017-07-08 23:42
579 查看
eclipse在创建Maven的war项目时,对于部分jsp页面可能在build或则其他某时会出现错误信息,该错误信息可以在窗口problems查看,也可以在jsp页面上直接看出:
错误信息:The superclass “javax.servlet.http.HttpServlet” was not found on。
原因:此处的HttpServlet相关api在通过maven管理后必须在编译期可用,对于其不可用则会出现提示小红叉,当然它对于项目的运行没有影响的。而早期的普通的动态web项目在编译期不检查该api,而直接在运行期使用操作。此处需要通过手动的配置将该api放在编译期可用的使用域中。
解决:在项目的配置文件pom.xml文件中添加配置如下:
错误信息:The superclass “javax.servlet.http.HttpServlet” was not found on。
原因:此处的HttpServlet相关api在通过maven管理后必须在编译期可用,对于其不可用则会出现提示小红叉,当然它对于项目的运行没有影响的。而早期的普通的动态web项目在编译期不检查该api,而直接在运行期使用操作。此处需要通过手动的配置将该api放在编译期可用的使用域中。
解决:在项目的配置文件pom.xml文件中添加配置如下:
<dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>compile</scope> </dependency> </dependencies>
相关文章推荐
- 新建maven项目后, jsp页面报错,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build
- Maven构建WEB项目JSP报The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP页面顶端出现错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的问题解决
- Maven项目红色叹号+JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java B
- Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 问题:Eclipse新建web项目出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build P
- jsp错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 新建JSP无法运行出现错误The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Pat解决办法
- Eclipse中新建Maven Web项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- MyEclipse:jsp错误 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 在创建Maven项目he superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP的jar类错误;The superclass "javax.servlet.http.HttpServlet" was not found on......报错
- 导入项目出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path错误
- maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 第一次写JSP程序可能会碰到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Pa
- eclipse中,项目有红叉之- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- jsp页面开始报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 新建MAVEN工程,JSP页面报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