我希望将一个值列表传递给web.xml中的筛选器定义,并从FilterConfig
对象中在过滤器中读取它。就像这样:
<filter-mapping>
<filter-name>HTTPWhiteListMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
<http-methods>
<http-method>GET</http-method>
<http-method>POST</http-method>
</http-methods>
</filter-mapping>
有什么想法吗?谢谢!
发布于 2014-05-21 19:08:00
唯一能做到这一点的方法是传递一个分离的init参数。
https://stackoverflow.com/questions/23786961
复制相似问题