(FilterConfig filterConfig)
| 1432 | } |
| 1433 | |
| 1434 | @Override |
| 1435 | public void init(FilterConfig filterConfig) throws ServletException { |
| 1436 | for (Enumeration<String> names = filterConfig.getInitParameterNames(); names.hasMoreElements();) { |
| 1437 | String name = names.nextElement(); |
| 1438 | String value = filterConfig.getInitParameter(name); |
| 1439 | |
| 1440 | try { |
| 1441 | if (name.startsWith(PARAMETER_EXPIRES_BY_TYPE)) { |
| 1442 | String contentType = |
| 1443 | name.substring(PARAMETER_EXPIRES_BY_TYPE.length()).trim().toLowerCase(Locale.ENGLISH); |
| 1444 | ExpiresConfiguration expiresConfiguration = parseExpiresConfiguration(value); |
| 1445 | this.expiresConfigurationByContentType.put(contentType, expiresConfiguration); |
| 1446 | } else if (name.equalsIgnoreCase(PARAMETER_EXPIRES_DEFAULT)) { |
| 1447 | this.defaultExpiresConfiguration = parseExpiresConfiguration(value); |
| 1448 | } else if (name.equalsIgnoreCase(PARAMETER_EXPIRES_EXCLUDED_RESPONSE_STATUS_CODES)) { |
| 1449 | this.excludedResponseStatusCodes = commaDelimitedListToIntArray(value); |
| 1450 | } else { |
| 1451 | log.warn(sm.getString("expiresFilter.unknownParameterIgnored", name, value)); |
| 1452 | } |
| 1453 | } catch (RuntimeException e) { |
| 1454 | throw new ServletException(sm.getString("expiresFilter.exceptionProcessingParameter", name, value), e); |
| 1455 | } |
| 1456 | } |
| 1457 | |
| 1458 | if (log.isTraceEnabled()) { |
| 1459 | log.trace(sm.getString("expiresFilter.filterInitialized", this.toString())); |
| 1460 | } |
| 1461 | } |
| 1462 | |
| 1463 | /** |
| 1464 | * <p> |
nothing calls this directly
no test coverage detected