Code example for ServletWebRequest

0
@Component("blStatelessSessionFilter") 
public class StatelessSessionFilter extends GenericFilterBean { 
 
    @Override 
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { 
        BLCRequestUtils.setOKtoUseSession(new ServletWebRequest((HttpServletRequest) request, (HttpServletResponse) response), Boolean.FALSE); 
        SessionlessHttpServletRequestWrapper wrapper = new SessionlessHttpServletRequestWrapper((HttpServletRequest) request); 
        filterChain.doFilter(wrapper, response); 
    } 
}