I have an xml file (applicationCtx-security.xml) where all spring security filters and custom filters and their beans are defined.
I need to implement a custom filter which should be called after any http response, so that I can clear my User Principal after every http response.

Already tried SecurityContextPersistenceFilter

```
public class ResponseFilter extends SecurityContextPersistenceFilter implements Filter{

    private static final Log log = LogFactory
            .getLog(ResponseFilter.class);

public static final String USERNAME_KEY = "username";

public ResponseFilter() {
    System.out.println("Inside constructor of ResponseFilter");
}

```

xml :

```
<beans:bean id="securityContextPersistenceFilter" class="org.springframework.security.web.context.SecurityContextPersistenceFilter">
        <beans:property name='securityContextRepository'>
            <beans:bean class="com.web.ResponseFilter">
            </beans:bean>
        </beans:property>
    </beans:bean>

```

My implemented code doesnot gets called.
ANy suggestions ?