if (filterChain == null)
{
// catch-all error filter
ErrorFilter errorFilter = new ErrorFilter();
// check proxy access
AccessFilter accessFilter = new AccessFilter();
// 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;