code: private String createId(FacesContext context)
              throws JspException {
  
          if (this.id == null) {
              return getFacesJspId();
          } else {
              // if this tag happens to be nested within <c:forEach>, jspId
              // will be the same for each iteration. So it is
              // transformed into a unique "id" by appending a counter which gets
              // stored in request scope with jspId as the key for use during next
              // iteration.
              if (isDuplicateId(this.id)) {
                  if (!isSpecifiedIdUnique(this.id)) {
                      if (isNestedInIterator) {
                          this.id = generateIncrementedId(this.id);
                      } else {
                          StringWriter writer = new StringWriter(128);
                          printTree(context.getViewRoot(), this.id, writer, 0);
                          String msg = "Component ID '"
                                  + this.id
                                  + "' has already been used"
                                  + " in the view.\n"
                                  + "See below for the view up to the point of"
                                  + " the detected error.\n"
                                  + writer.toString();
                          throw new JspException(msg);
                      }
                  }
              }
              return (this.id);
          }
  
      }
docs: <p>Create the component identifier to be used for this component.</p>