Request processing failed; nested exception is com.sun.jersey.api.client.UniformInterfaceException:

SpringMVC建了两个TomCat服务器模拟跨服务器传文件,出现了Request processing failed; nested exception is com.sun.jersey.api.client.UniformInterfaceException: PUT http://localhost:9090/fileupload_war/uploads/111.png returned a response status of 405 Method Not Allowed 这个错误
Request processing failed; nested exception is com.sun.jersey.api.client.UniformInterfaceException:_第1张图片
百度一查才知道,原来tomcat中 readonly 这个参数默认为true,即禁止delete和put操作,难怪会出问题

解决:需要在Tomcat目录下的conf文件夹下的web.xml中加入,再重启tomcat就可以啦

<init-param>
        <param-name>readonly</param-name>
        <param-value>false</param-value>
     </init-param>

Request processing failed; nested exception is com.sun.jersey.api.client.UniformInterfaceException:_第2张图片

你可能感兴趣的:(经验)