// set up ProxyContext
ProxyContextFilter contextFilter = new ProxyContextFilter();
// sends out response after further filters
ResponseFilter responseFilter = new ResponseFilter();
// deals with credentials
SecurityFilter securityFilter = new SecurityFilter();
// sends out the request
RequestFilter requestFilter = new RequestFilter();
errorFilter.setNext(accessFilter);
accessFilter.setNext(contextFilter);
contextFilter.setNext(responseFilter);
responseFilter.setNext(securityFilter);
securityFilter.setNext(requestFilter);
filterChain = errorFilter;
}
return filterChain;
}