WhaleFilter?ALLOW_HTTP_METHOD_OVERRIDE失效了??怎么用了??
问答
WhaleFilter?ALLOW_HTTP_METHOD_OVERRIDE失效了??怎么用了??
标签:
无
4 回复
WhaleFilter专门干"脏活"
<filter>
<filter-class>org.nutz.mvc.WhaleFilter</filter-class>
<filter-name>whale</filter-name>
<init-param>
<param-name>config</param-name>
<param-value>
http.hidden_method_param=_method
http.method_override=true
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>whale</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
已经按照上面的配置了,把whale放到了第一位,但是我发现只有下面这种写法才能触发这个功能
这样才能触发put方法
<form action="/back/service/taskpl?_method=put" method="post">
...
</form>
无法触发
<form action="/back/service/taskpl" method="post">
<input type="hidden" name="_method" value="put" />
</form>
入口方法的片段
@At ( "" )
@PUT
@Ok ( ">>:" + ServiceTaskPL.URL )
public void createUpdate (){}
添加回复
请先登陆