I was reading through Filter concepts and have a doubt if filters will be invoked for AJAX requests in JSF application.
Filter mapping is as below
<filter-mapping>
<filter-name>ModuleSecurityFilter</filter-name>
<url-pattern>/protected/*</url-pattern>
</filter-mapping>
Yes.The filter will be invoked as long as the submits from your JSF views are to the URL matching the filter’s
url-pattern. In your case if the submit is for any “/protected/anything“With JSF1.2, all your command actions (commandbutton/commandlinks) will be forced to POST submit the form data to the same view.
Say your current view is
/protected/firstview.jsf, then all your<h:commandButton /> , <h:commandLink />, <a4j:commandButton /> <a4j:commandLink /> , <a4j:support action="" />will be submitting a POST reqest to the same view/protected/firstview.jsf. So all therequests will have to go through the filter.