// Get all constraints that have our URL pattern
// (Note the crazy j: prefix to denote the 2.4 j2ee schema)
selector = "//j:web-app/j:security-constraint[j:web-resource-collection/j:url-pattern=\"" + url + "\"]";
xpath = XPath.newInstance( selector );
xpath.addNamespace( "j", J2EE_SCHEMA_24_NAMESPACE );
List<?> constraints = xpath.selectNodes( root );
// Get all constraints that match our Role pattern
selector = "//j:web-app/j:security-constraint[j:auth-constraint/j:role-name=\"" + role.getName() + "\"]";
xpath = XPath.newInstance( selector );
xpath.addNamespace( "j", J2EE_SCHEMA_24_NAMESPACE );