How to config maven to use servlet 3

此生再无相见时 提交于 2019-12-05 00:01:20

Your options are actually 3.0.1 or 3.1.0 of the final releases, and the artifact ID has been changed. Using the old servlet-api artifact ID, the releases available are only 2.x, aside from the alpha you've found.

If you update to javax.servlet-api, you'll find the newer 3.x releases:

http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api

You can update your POM to use:

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

Try this dependency

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

found here: http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api

There is also a version 3.0.1 if you need something closer to 3.0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!