code: protected void addVerbatimBeforeComponent(
              UIComponentClassicTagBase parentTag,
              UIComponent verbatim,
              UIComponent component) {
  
          UIComponent parent = component.getParent();
          if (null == parent) {
              return;
          }
  
          List<UIComponent> children = parent.getChildren();
          // EDGE CASE:
          // Consider CASE 1 or 2 where the component is provided via a
          // component binding in session or application scope.
          // The automatically created UIOuput instances for the template text
          // will already be present.  Check the JSP_CREATED_COMPONENT_IDS attribute,
          // if present and the number of created components is the same
          // as the number of children replace at a -1 offset from the current
          // value of indexOfComponentInParent, otherwise, call add()
          List createdIds = (List)
                  parent.getAttributes().get(JSP_CREATED_COMPONENT_IDS);
          int indexOfComponentInParent = children.indexOf(component);
          boolean replace =
                  (indexOfComponentInParent > 0 && createdIds != null &&
                          createdIds.size() == children.size());
          if (replace) {
              UIComponent oldVerbatim = children.get(indexOfComponentInParent - 1);
              if (oldVerbatim instanceof UIOutput && oldVerbatim.isTransient()) {
                  children.set((indexOfComponentInParent - 1), verbatim);
              } else {
                  children.add(indexOfComponentInParent, verbatim);
              }
          } else {
              children.add(indexOfComponentInParent, verbatim);
          }
          parentTag.addChild(verbatim);
      }
docs: <p>Add <i>verbatim</i> as a sibling of <i>component</i> in
  <i>component</i> in the parent's child list.  <i>verbatim</i> is
  added to the list at the position immediatly preceding
  <i>component</i>.</p>