web app 接收put的配置方式
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web app 接收put的配置方式相关的知识,希望对你有一定的参考价值。
HiddenHttpMethodFilter/HttpPutFormContentFilter
HiddenHttpMethodFilter:HiddenHttpMethodFilter必须作用于dispatcher前
<filter> <filter-name>HiddenHttpMethodFilter</filter-name> <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class> </filter> <filter-mapping> <filter-name>HiddenHttpMethodFilter</filter-name> <servlet-name>spring</servlet-name> </filter-mapping> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:dispatcher.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping>
<form action="..." method="post"> <input type="hidden" name="_method" value="put" /> ...... </form>
HttpPutFormContentFilter:
<filter> <filter-name>httpPutFormcontentFilter</filter-name> <filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class> </filter> <filter-mapping> <filter-name>httpPutFormContentFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
<form action="" method="put" enctype="application/x-www-form-urlencoded"> ...... </form>
以上是关于web app 接收put的配置方式的主要内容,如果未能解决你的问题,请参考以下文章
IOS开发教程之put上传文件的服务器的配置及实例分享-备用