I have a problem where an action in my h:commandLink
is not firing. I reviewed BalusC's very useful post on what the cause might be, and I was able to trace it to number 11:
Be sure that no Filter or Servlet in the same request-response chain has blocked the request for the FacesServlet somehow.
There is a filter that seems to be causing the problem - I found this by removing the filter and trying again. I unfortunately did not write the filter, and more unfortunately I have very little knowledge about them. So I am wondering if there is a good way to have this filter not apply to the h:commandLink
action firing? I see the doFilter()
method gets passed the following parameters:
ServletRequest request
ServletResponse response
FilterChain chain
So my first instinct is to see if there is something I can use in one of those parameters that will tell me this is a click from my h:commandLink
. If so, I would have all of the code in the doFilter()
method get bypassed. Not sure if that is even possible, or a good way to do this, but that is the first thing that comes to mind.
But I would also like to ask here if there is a decent way to handle this? Or does this indicate some sort of problem with the filter itself I might need to look at fixing? Any info like that would be useful.
BTW, I know I can probably use an actionListener
to fire the method in my bean, however, this is bad design as I understand it, so I would like to avoid this.