final ContextHandler contextHandler = new ContextHandler();
contextHandler.setContextPath(pathInfo);
contextHandler.setAllowNullPathInfo(true);
contextHandler.setConnectorNames(new String[]{connectorName});
contextHandler.addLocaleEncoding(Locale.US.getDisplayName(), StringUtils.UTF_8);
contextHandler.setHandler(handler);
final MimeTypes mimeTypes = new MimeTypes();
mimeTypes.setMimeMap(new HashMap());
contextHandler.setMimeTypes(mimeTypes);