@Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {

        HttpServletRequestWrapper reqestWrapper =
                        (HttpServletRequestWrapper) request.getAttribute("com.ibm.ws.security.jaspi.servlet.request.wrapper");
        HttpServletResponseWrapper responseWrapper =
                        (HttpServletResponseWrapper) request.getAttribute("com.ibm.ws.security.jaspi.servlet.response.wrapper");
        ServletRequest req = reqestWrapper != null ? reqestWrapper : request;
        ServletResponse res = responseWrapper != null ? responseWrapper : response;
        chain.doFilter(req, res);
    }
@ Override public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { HttpServletRequestWrapper reqestWrapper = ( HttpServletRequestWrapper ) request . getAttribute ( "com.ibm.ws.security.jaspi.servlet.request.wrapper" ) ; HttpServletResponseWrapper responseWrapper = ( HttpServletResponseWrapper ) request . getAttribute ( "com.ibm.ws.security.jaspi.servlet.response.wrapper" ) ; ServletRequest req = reqestWrapper != null ? reqestWrapper : request ; ServletResponse res = responseWrapper != null ? responseWrapper : response ; chain . doFilter ( req , res ) ; }
/*
If a JASPI provider returned request/response wrappers in the MessageInfo object then
use those wrappers instead of the original request/response objects for web request.

@see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)