dig*_*oel 46
我相信大多数web/app服务器捆绑了一个版本的servlet api,因此你不希望在你的.war文件中捆绑api.您需要找出服务器附带的版本,然后才能使用
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-version}</version>
<scope>provided</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
用您的版本替换servlet-api-version.您需要指定"提供的"范围,以便api.jar不包含在war文件中.