コード例 #1
0
  protected void configure(FilterMapping filterMapping) {
    try {
      if (_urlPattern != null) filterMapping.createUrlPattern().addText(_urlPattern).init();

      if (_servletName != null) filterMapping.addServletName(_servletName);

      filterMapping.setFilterName(_filterName);

      if (_filterClass != null) filterMapping.setFilterClass(_filterClass);

      for (Map.Entry<String, String> entry : _initParamMap.entrySet()) {
        filterMapping.setInitParam(entry.getKey(), entry.getValue());
      }

      filterMapping.setInit(_init);

      // filterMapping.init();
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
  }
コード例 #2
0
 /** Sets an init-param. */
 public void setInitParam(String name, String value) {
   _initParamMap.put(name, value);
 }