SecurityConstraint securityConstraint = new SecurityConstraintImpl();
WebResourceCollectionImpl webResourceColl = new WebResourceCollectionImpl();
securityConstraint.addWebResourceCollection(webResourceColl);
for (String urlPattern : urlPatterns) {
webResourceColl.addUrlPattern(urlPattern);
}
AuthorizationConstraintImpl ac = null;
if (rolesAllowed != null && rolesAllowed.length > 0) {
if (emptyRoleSemantic == EmptyRoleSemantic.DENY) {