code: private void registerServletDescriptor(ServletDescriptor servletDescriptor) {
          try {
              servletDescriptor.register(httpService);
          } catch (RuntimeException e) {
              LOG.error(
                  "Registration of ServletDescriptor under mountpoint {} fails with unexpected RuntimeException!",
                  servletDescriptor.getAlias(), e);
          } catch (ServletException e) {
              LOG.error(
                  "Unable to mount servlet on mount point '{}', either it was already registered under the same alias or the init method throws an exception",
                  servletDescriptor.getAlias(), e);
          } catch (NamespaceException e) {
              LOG.error(
                  "Unable to mount servlet on mount point '{}', another resource is already bound to this alias",
                  servletDescriptor.getAlias(), e);
          }
      }
docs: Register a servlet descriptor with an {@link HttpService} using a {@link ServletDescriptor}