public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
throws IOException, ServletException {
final Context previous = contexts.get();
try {
final Context context = (new SliceContextFactory()).getServletRequestContext(request, response);
contexts.set(context);
chain.doFilter(request, response);
} finally {
contexts.set(previous);
}