【发布时间】:2013-09-04 19:23:46
【问题描述】:
我有一个需要 id 参数 (GET) 的过滤器。当我在导航链接中添加参数时,这很好用。但是当我停留在同一个站点(例如 ajax 调用)时,过滤器会大喊大叫,因为 id 参数丢失了。
如果请求来自ajax,是否有机会忽略过滤器? 像
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
if (FacesContext.getCurrentInstance().isPostback()) {...}
...
}
?
【问题讨论】:
标签: ajax jsf postback servlet-filters