I've written a filter class to add a P3P header to every page. I added this to my web.xml:
<filter>
<filter-name>AddP3pHeaderFilter</filter-name>
<filter-class>com.mycompany.AddP3pHeaderFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AddP3pHeaderFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
It adds the header to every page request, but it doesn't work when the user first logs in. The user submits the form to j_security_check
, but the response doesn't include the header. How can I make my filter apply to the login request?