/** * Initializes the filter by calling <code>filter.init( {@link #getFilterConfig() getFilterConfig()} );</code>. * * @param filter the filter to initialize with the {@code FilterConfig}. */ protected void initFilter(Filter filter) { FilterConfig filterConfig = getFilterConfig(); if (filterConfig == null) { throw new IllegalStateException("FilterConfig attribute has not been set. This must occur before filter " + "initialization can occur."); } try { filter.init(filterConfig); } catch (ServletException e) { throw new ConfigurationException(e); } }