星空网 > 软件开发 > Java

The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

【转载,原博 eap 6.2。新建jsp页面,添加一个简单的Java类。可是,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was notfound on the Java Build Path。原来Javaweb工程类中没有添加Web 容器Runtime相关类导致。

错误提示:

The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

 

 

解决方法很简单,在pom.

<dependency><groupId>javax.servlet</groupId><artifactId>servlet-api</artifactId><version>2.5</version><scope>provided</scope></dependency>

补充:如果还提示错误,还可以尝试下面的方式:

1、右击web工程-》属性或Build Path-》Java Build Path->Libraries-> Add Libray...->Server Runtime -》JBoss 7.1 Runtime

The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

2、切换到Java Build Path界面中的Orader and Export,选择

The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

 

原标题:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

关键词:JAVA

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流