src/main/java/org/efaps/ui/filter/AbstractFilter.java
@Override
    public void doFilter(final ServletRequest _request,
                         final ServletResponse _response,
                         final FilterChain _chain)
        throws IOException, ServletException
    {

        if (_request instanceof HttpServletRequest
                        && _response instanceof HttpServletResponse) {

            doFilter((HttpServletRequest) _request, (HttpServletResponse) _response, _chain);
        } else {
            throw new ServletException("request not allowed");
        }
    }
@Override
    public void doFilter(final ServletRequest _request,
                         final ServletResponse _response,
                         final FilterChain _chain)
        throws IOException, ServletException
    {

        if (_request instanceof HttpServletRequest
                        && _response instanceof HttpServletResponse) {

            doFilter((HttpServletRequest) _request, (HttpServletResponse) _response, _chain);
        } else {
            throw new ServletException("request not allowed");
        }
    }
@ Override public void doFilter ( final ServletRequest _request , final ServletResponse _response , final FilterChain _chain ) throws IOException , ServletException { if ( _request instanceof HttpServletRequest && _response instanceof HttpServletResponse ) { doFilter ( ( HttpServletRequest ) _request , ( HttpServletResponse ) _response , _chain ) ; } else { throw new ServletException ( "request not allowed" ) ; } }
First the filtes tests, if the http(s) protokoll is used. If the request
is not implementing the {@link HttpServletRequest} and the response is
not implementing the {@link HttpServletResponse} interface, a
{@link ServletException} is thrown.<br/>

@param _request  ServletRequest
@param _response ServletResponse
@param _chain    FilterChain
@throws ServletException if the request and response does not use the
http(s) protokoll
@see HttpServletRequest
@see HttpServletResponse
@see #checkLogin
@throws IOException on error
First the filtes tests if the http ( s ) protokoll is used . If the request is not implementing the { @link HttpServletRequest } and the response is not implementing the { @link HttpServletResponse } interface a { @link ServletException } is thrown . <br / >