首页 > 编程语言 > 详细

eclipse新建maven项目报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决方案

时间:2016-07-11 00:52:33      阅读:165      评论:0      收藏:0      [点我收藏+]

具体表现为:

使用Eclipse+Maven建立了一个Javaweb工程,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。

解决方法:

在pom.xml中的  <build></build>中  添加:

    <plugins>
        <!-- 编码和编译和JDK版本 -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>utf8</encoding>
            </configuration>
        </plugin>
    </plugins>

 然后Maven > Update project即可

eclipse新建maven项目报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决方案

原文:http://www.cnblogs.com/007sx/p/5658978.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!