securityHandler.setStrict(false);
handler.setSecurityHandler(securityHandler);
}
RewriteHandler rewrite = new RewriteHandler();
rewrite.setRewriteRequestURI(true);
RewriteRegexRule redirectRoot = new RewriteRegexRule();
redirectRoot.setRegex("^/$");
redirectRoot.setReplacement("/webapp/graph-editor/graph");
rewrite.addRule(redirectRoot);
if(!pathPrefix.isEmpty()) {
RedirectPatternRule redirect = new RedirectPatternRule();
redirect.setPattern(pathPrefix + "/");
redirect.setLocation(pathPrefix + "/webapp/graph-editor/graph");
rewrite.addRule(redirect);
RewriteRegexRule reverse = new RewriteRegexRule();
reverse.setRegex(pathPrefix + "/(.*)");
reverse.setReplacement("/$1");
rewrite.addRule(reverse);
}
rewrite.setHandler(handlers);
handlers.addHandler(handler);
ResourceHandler resHandler = new ResourceHandler();
resHandler.setResourceBase(webdir);