Useful beans that can be used during development of Struts 2 base application
It can be used to evaluate RegExp expression in your application. It can be injected into or created by hand. Some simple example shows that below:
@Inject
public void setMatcher(PatternMatcher matcher) {
this.matcher = matcher;
}
private boolean matchesWildcard(String pattern, String data) {
Object exp = matcher.compilePattern(pattern);
return matcher.match(new HashMap<String, String>(), data, exp);
}