docs: @Override
      public int doEndTag() throws JspException {
  
          Tag t = findAncestorWithClass(this, I_CmsJspTagParamParent.class);
          if (t == null) {
              throw new JspTagException(Messages.get().getBundle(pageContext.getRequest().getLocale()).key(
                  Messages.ERR_PARENTLESS_TAG_1,
                  new Object[] {"param"}));
          }
          // take no action for null or empty names
          if (CmsStringUtil.isEmpty(m_name)) {
              return EVAL_PAGE;
          }
  
          // send the parameter to the appropriate ancestor
          I_CmsJspTagParamParent parent = (I_CmsJspTagParamParent)t;
          String value = m_value;
          if (value == null) {
              if ((bodyContent == null) || (bodyContent.getString() == null)) {
                  value = "";
              } else {
                  value = bodyContent.getString().trim();
              }
          }
          if (m_encode) {
              parent.addParameter(
                  CmsEncoder.encode(m_name, OpenCms.getSystemInfo().getDefaultEncoding()),
                  CmsEncoder.encode(value, OpenCms.getSystemInfo().getDefaultEncoding()));
          } else {
              parent.addParameter(m_name, value);
          }
  
          return EVAL_PAGE;
      }