eclipse+maven新建项目index.jsp页面报错

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34579313/article/details/77742751

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

解决方法:

在pom.xml文件中加入

<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   这个时候你会发现这个错误没有了吐舌头




猜你喜欢

转载自blog.csdn.net/qq_34579313/article/details/77742751