Tag Archives: Maven executes servlet error

[Solved] Maven executes servlet error: HTTP Status 500

An error is reported when the servlet executes and the dependency range is not written

Solution:

add the following code to pom.xml, mainly the dependency range provided

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