文件上传到远程服务器 a response status of 405 Method Not Allowed
程序员文章站
2022-04-14 13:40:43
...
报错代码如下所示
严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is com.sun.jersey.api.client.UniformInterfaceException: PUT http://192.168.8.125:8080/upload/1981fed4-65a6-4708-a891-b854b6bfa8a5.jpg returned a response status of 405 Method Not Allowed] with root cause
com.sun.jersey.api.client.UniformInterfaceException: PUT http://192.168.8.125:8080/upload/1981fed4-65a6-4708-a891-b854b6bfa8a5.jpg returned a response status of 405 Method Not Allowed
解决方案:
修改tomcat的web.xml
在web.xml中输入如下代码
<init-param>
<param-name>readonly</param-name>
<param-value>false</param-value>
</init-param>
代码的具体插入位置如下图所示
下一篇: Storm集群安装与部署