/** Adds a url-pattern */
  public void addURLPattern(String pattern) throws PatternSyntaxException {
    String regexpPattern = UrlMap.urlPatternToRegexpPattern(pattern);

    int flags = (CauchoSystem.isCaseInsensitive() ? Pattern.CASE_INSENSITIVE : 0);

    Pattern regexp = Pattern.compile(regexpPattern, flags);

    _urlPatternList.add(regexp);
  }
Ejemplo n.º 2
0
  /** Sets the url-pattern */
  public void addURLPattern(String pattern) {
    String regexpPattern = UrlMap.urlPatternToRegexpPattern(pattern);

    int flags = (CauchoSystem.isCaseInsensitive() ? Pattern.CASE_INSENSITIVE : 0);
    try {
      _regexp = Pattern.compile(regexpPattern, flags);
    } catch (PatternSyntaxException e) {
      log.log(Level.WARNING, e.toString(), e);
    }
  }