}
String docBase = mapping[1].substring("dir=".length());
String urlPattern = mapping[0].substring("from=".length());
try {
StaticResourcesAdapter a = new StaticResourcesAdapter();
a.addRootFolder(docBase);
ArrayList<String> al = toArray(vs.getHosts(),";");
al.add(grizzlyListener.getDefaultVirtualServer());
registerEndpoint(urlPattern,al , a, null);
} catch (EndpointRegistrationException ex) {
logger.log(Level.SEVERE, "Unable to set alternate_docroot", ex);