code: public synchronized void unregister() {
          if (this.service != null) {
              LOG.info("unregister servlet on mountpoint {} with contextParams {}", getAlias(),
                  contextParams);
              this.service.unregister(getAlias());
              this.service = null;
          }
      }
docs: Unregister a servlet if already registered. After this call it is save to register the servlet again