Renders the content of the attribute.
@return EVAL_PAGE to continue evaluation of the page.
@throws JspException If there is any failure in the tag.
500757
public int doStartTag()
            throws JspException {
        ServletRequest req = pageContext.getRequest();
        HashMap atts = (HashMap) req.getAttribute(TEMPLATE_ATTRIBUTES);
        try {
            if (atts != null) {
                String val = (String) atts.get(_name);
                if (val != null) {
                    Writer out = pageContext.getOut();
                    out.write(val);
                }
                else {
                    Writer out = pageContext.getOut();
                    if (_defaultValue != null)
                        out.write(_defaultValue);
                    else
                        out.write("");
                }
            }
            else {
                Writer out = pageContext.getOut();
                if (_defaultValue != null)
                    out.write(_defaultValue);
                else
                    out.write("");
            }
        }
        catch (IOException e) {
            localRelease();
            JspException jspException = new JspException("Caught IO Exception:" + e.getMessage(),e);
            // todo: future cleanup
            // The 2.5 Servlet api will set the initCause in the Throwable superclass during construction,
            // this will cause an IllegalStateException on the following call.
            if (jspException.getCause() == null) {
                jspException.initCause(e);
            }
            throw jspException;
        }
        localRelease();
        return EVAL_PAGE;
    }
412152
final public function render()
    {
        foreach ($this->layers as $layer) {

            if (! method_exists($this, $layer)) {
                Throw new PageException('Template Error: The requested layer "' . $layer . '" does not exist.');
            }

            $this->$layer();
        }
    }
1164310
@Override
    public int doEndTag() throws JspException {

        ServletRequest req = pageContext.getRequest();
        A_CmsConfiguredHtmlParser parser;
        if (m_allowInlineEdit && CmsJspTagEditable.isEditableRequest(req)) {
            // during inline editing the content should not be parsed
            try {
                getBodyContent().writeOut(pageContext.getOut());
                release();
            } catch (Exception ex) {
                release();
                if (LOG.isErrorEnabled()) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, TAG_NAME), ex);
                }
                // this is severe
                throw new JspException(ex);
            }
        } else {
            // This will always be true if the page is called through OpenCms
            if (CmsFlexController.isCmsRequest(req)) {
                String content = "";
                try {
                    if (CmsStringUtil.isEmpty(m_configuredParserClassname)) {
                        if (LOG.isErrorEnabled()) {
                            LOG.error(
                                Messages.get().getBundle().key(
                                    Messages.GUI_ERR_TAG_ATTRIBUTE_MISSING_2,
                                    new Object[] {TAG_NAME, ATT_VISITOR_CLASS}));
                        }

                    }
                    // wrong attribute visitorClass -> content will remain empty, but no exception is
                    // thrown
                    try {
                        // load
                        Class<?> cl = Class.forName(m_configuredParserClassname);
                        // Instantiate
                        Object instance = cl.newInstance();
                        // cast
                        parser = (A_CmsConfiguredHtmlParser)instance;
                        parser.setParam(m_param);
                        // cms object:
                        CmsFlexController controller = CmsFlexController.getController(req);
                        CmsObject cms = controller.getCmsObject();
                        parser.setCmsObject(cms);
                        content = parseTagAction(getBodyContent().getString(), pageContext, parser);

                    } catch (Exception e) {
                        if (LOG.isErrorEnabled()) {
                            LOG.error(
                                Messages.get().getBundle().key(
                                    Messages.GUI_ERR_TAG_ATTRIBUTE_INVALID_3,
                                    new Object[] {
                                        TAG_NAME,
                                        ATT_VISITOR_CLASS,
                                        A_CmsConfiguredHtmlParser.class.getName()}),
                                e);
                        }
                        e.printStackTrace(System.err);
                    }

                } finally {
                    try {
                        getBodyContent().clear();
                        getBodyContent().print(content);
                        getBodyContent().writeOut(pageContext.getOut());
                        release();

                    } catch (Exception ex) {
                        release();
                        if (LOG.isErrorEnabled()) {
                            LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, TAG_NAME), ex);
                        }
                        // this is severe
                        throw new JspException(ex);
                    }

                }

            }
        }
        return EVAL_PAGE;
    }
1112527
public int doEndTag() throws JspException
    {
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // we verified that the parent was a CheckboxGroup in the doBeginTag()
        ServletRequest req = pageContext.getRequest();
        CheckBoxGroup parent = (CheckBoxGroup) findAncestorWithClass(this, CheckBoxGroup.class);
        ConstantRendering cr = TagRenderingBase.Factory.getConstantRendering(req);
        boolean repeat = parent.isRepeater();

        // create the writer
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        if (!repeat && parent.isVertical()) {
            cr.TR_TD(writer);
        }


        _state.type = INPUT_CHECKBOX;
        _state.name = parent.getQualifiedDataSourceName();
        if (_state.id != null) {
            String tagId = _state.id;
            _state.id = getIdForTagId(_state.id);
            /* This has been commented out because we can't set focus on checkbox options
               because they don't have a unique name.
            Form parentForm = getNearestForm();
            if (parentForm != null)
                parentForm.addTagID(tagId, _state.name);
                */
            String script = renderDefaultNameAndId((HttpServletRequest) req, _state, tagId, _state.name);
            if (script != null) {
                write(script);
            }
        }

        // Disabled on the option itself will override the parent setting this.
        // We check to see if the option actuall had disabled set on it, if not then look
        // at the parent.
        if (parent.isMatched(_state.value, _defaultValue))
            _state.checked = true;
        _state.disabled = isDisabled();
        if (!_state.disabled)
            _state.disabled = parent.isDisabled();

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(writer, _state);
        br.doEndTag(writer);

        if (repeat && !parent.isDisabled()) {
            parent.createHiddenField(writer);
        }

        // if this is in a repeater, then we only output the <input tag>
        if (repeat) {
            //write(results.toString());
            localRelease();
            return EVAL_PAGE;
        }

        if (_spanState.style == null) {
            _spanState.style = parent.getLabelStyle();
        }
        if (_spanState.styleClass == null) {
            _spanState.styleClass = parent.getLabelStyleClass();
        }

        TagRenderingBase spanTag = TagRenderingBase.Factory.getRendering(TagRenderingBase.SPAN_TAG, req);
        spanTag.doStartTag(writer, _spanState);
        if (_text == null)
            write(_state.value);
        else
            write(_text);
        spanTag.doEndTag(writer);

        if (parent.isVertical()) {
            cr.end_TD_TR(writer);
        }

        // Continue evaluating this page
        localRelease();
        return EVAL_PAGE;

    }
494772
public Object evaluate(String pAttributeName,
                           String pAttributeValue,
                           Class pExpectedType,
                           Tag pTag,
                           PageContext pPageContext)
            throws JspException {
        return evaluate(pAttributeName,
                pAttributeValue,
                pExpectedType,
                pTag,
                pPageContext,
                null,
                null);
    }
507915
public function render()
    {
        // returning empty string if the num pages is zero
        if ($this->pages == 0 || $this->pages == 1) {
            return '';
        }

        $output[] = $this->open() . PHP_EOL;

        $current = (int)input()->get('page');
        $current = $current == 0 ? 1 : $current;

        $previous = new Element('span');
        $previous->entity->setEntityName('previous');
        $previous->attributes->addAttribute('aria-hidden', true);
        $previous->textContent->push('&laquo;');

        if ($current == 1) {
            $this->createList(new Link($previous, '#'));
            $this->childNodes->current()->disabled();
        } else {
            $this->createList(new Link($previous, current_url('', ['page' => $current - 1])));
        }

        foreach (range(1, $this->pages) as $page) {
            $this->createList(new Link($page, current_url('', ['page' => $page])));

            if ($current == $page) {

                $currentNode = $this->childNodes->current();
                $currentNode->active();

                $srOnly = new Element('span');
                $srOnly->entity->setEntityName('current');
                $srOnly->attributes->addAttributeClass('sr-only');
                $srOnly->textContent->push('(current)');

                $currentNode->childNodes->first()->childNodes->push($srOnly);
            }
        }

        $next = new Element('span');
        $next->entity->setEntityName('next');
        $next->attributes->addAttribute('aria-hidden', true);
        $next->textContent->push('&raquo;');

        if ($current == $this->pages) {
            $this->createList(new Link($next, '#'));
            $this->childNodes->current()->disabled();
        } else {
            $this->createList(new Link($next, current_url('', ['page' => $current + 1])));
        }

        if ($this->hasChildNodes()) {
            $output[] = implode(PHP_EOL, $this->childNodes->getArrayCopy());
        }

        $output[] = PHP_EOL . $this->close();

        return implode('', $output);
    }
738801
public int doEndTag() throws JspException {
        if (value == null) {
            if (var != null) {
                pageContext.removeAttribute(var, scope);
            }
            return EVAL_PAGE;
        }

        // Create formatter
        DateTimeFormatter formatter;
        if (pattern != null) {
            formatter = DateTimeFormat.forPattern(pattern);
        } else if (style != null) {
            formatter = DateTimeFormat.forStyle(style);
        } else {
            // use a medium date (no time) style by default; same as jstl
            formatter = DateTimeFormat.mediumDate();
        }

        // set formatter locale
        Locale locale = this.locale;
        if (locale == null) {
            locale = Util.getFormattingLocale(pageContext, this, true,
                    DateFormat.getAvailableLocales());
        }
        if (locale != null) {
            formatter = formatter.withLocale(locale);
        }

        // set formatter timezone
        DateTimeZone tz = this.dateTimeZone;
        if (tz == null) {
            tz = DateTimeZoneSupport.getDateTimeZone(pageContext, this);
        }
        if (tz != null) {
            formatter = formatter.withZone(tz);
        }

        // format value
        String formatted;
        if (value instanceof ReadableInstant) {
            formatted = formatter.print((ReadableInstant) value);
        } else if (value instanceof ReadablePartial) {
            formatted = formatter.print((ReadablePartial) value);
        } else {
            throw new JspException(
                "value attribute of format tag must be a ReadableInstant or ReadablePartial," +
                " was: " + value.getClass().getName()); 
        }

        if (var != null) {
            pageContext.setAttribute(var, formatted, scope);
        } else {
            try {
                pageContext.getOut().print(formatted);
            } catch (IOException ioe) {
                throw new JspTagException(ioe.toString(), ioe);
            }
        }

        return EVAL_PAGE;
    }
494270
public function render( $attributes = array() ) 
    {
        if( ! $this->tagName ) {
            throw new Exception('tagName is not defined.');
        }

        $html = $this->open( $attributes );

        // render close tag
        if( $this->hasChildren() ) {
            $html .= $this->renderChildren();
        }

        $html .= $this->close();
        return $html;
    }
620527
public static Object evaluate(String attributeName,
                                  String expression,
                                  Class expectedType,
                                  Tag tag,
                                  PageContext pageContext)
            throws JspException {

        // delegate the call
        return (EVALUATOR.evaluate(attributeName, expression, expectedType, tag, pageContext));
    }
375460
function toHtml()
    {
        $e = $this->e;

        try {
            $renderer = new RendererPhp();
            return $renderer->capture(
                __DIR__ . '/../.error.page.php'
                , array('exception' => $e)
            );
        } catch(\Exception $ve) {
            ## throw exception if can't render template
            throw $e;
        }
    }
920362
public int doEndTag() throws JspException {
        // Trim
        String trimmed = truncateWS(bodyContent.getString());
        try {
            // Print trimmed content
            //pageContext.getOut().print("<!--TWS-->\n");
            pageContext.getOut().print(trimmed);
            //pageContext.getOut().print("\n<!--/TWS-->");
        }
        catch (IOException ioe) {
            throw new JspException(ioe);
        }

        return super.doEndTag();
    }
116230
public function evaluateWebPage() {
    try {
      $renderer = new PageRenderer($this->webPage, $this->uriVariables);
      $this->response = $renderer->evaluatePage();
      $this->rawRequestBody = $this->response->getResult();
    } catch (WebException $e) {
      // FIXME this is ugly
      $this->thrownWebException = $e;
      $this->rawRequestBody = $this->createRequestBodyFromException();
    } finally {
      $this->evaluated = true;
    }
  }
556407
public function render()
    {
        // Set the request arguments as GET parameters
        $_GET = $this->getRequestArguments();

        try {
            $this->controllerContext->getRequest()->setOriginalRequestMappingResults($this->validationErrors);

            // Render the content element
            $result = $this->beautify($GLOBALS['TSFE']->cObj->cObjGetSingle('RECORDS', $this->config));

            // In case of an error
        } catch (\Exception $e) {
            $result = '<pre class="error"><strong>'.$e->getMessage().'</strong>'.PHP_EOL
                      .$e->getTraceAsString().'</pre>';
        }

        return $result;
    }
125852
@Override
	public int doStartTag() throws JspException {

		String string = null;
		Boolean bool = null;
		if (getBase64Expr() != null
				&& (bool = EvalHelper.evalBoolean("base64", getBase64Expr(), this, pageContext)) != null) {
			setBase64(bool);
		}

		if (getSrcExpr() != null
				&& (string = EvalHelper.evalString("srcExpr", getSrcExpr(), this, pageContext)) != null) {

			setSrc(string);
		}

		return super.doStartTag();
	}
423271
@Override
    public int doEndTag() throws JspException {
        if (!scopeSpecified) {
            pageContext.removeAttribute(var);
        } else {
            pageContext.removeAttribute(var, scope);
        }
        return EVAL_PAGE;
    }
82582
public int doStartTag()
            throws JspException {
        Object source = evaluateDataSource();

        // report any errors that may have occured 
        if(hasErrors())
            return SKIP_BODY;

        _renderState = INIT;

        boolean empty = false;
        if(source != null) {
            _iterator = IteratorFactory.createIterator(source);
            if(_iterator == null) {
                LOGGER.warn(Bundle.getString("Tags_Repeater_nullIterator"));
                _iterator = Collections.EMPTY_LIST.iterator();
            }

            if(_iterator.hasNext()) {
                _currentIndex = 0;
                _currentItem = _iterator.next();

                if(_ignoreNulls && _currentItem == null) {
                    /*
                      doStartTag doesn't know if the repeater is structured or unstructured
                      thus, if ignoreNulls is true, it's going to make an attempt to go
                      through the body with a non-null item.  if there are no non-null
                      items in the data structure, the doAfterBody method will handle
                      this correctly, but a data structure with a null first item
                      will render the same as a data structure with a null second item
                     */
                    advanceToNonNullItem();

                    /*
                       this null check needs to re-run here because the advanceToNonNullItem method
                       side-effects the _currentItem.
                     */
                    if(_currentItem == null)
                        empty = true;
                }
            }
            /* there is no data set of there are zero items in the iterator */
            else empty = true;
        }
        /* the dataSource evaluated to null */
        else {
            _iterator = Collections.EMPTY_LIST.iterator();
            empty = true;
        }

        if(empty) {
            /* if the defaultText attribute is non-null, it will be evaluated as an expression and rendered to the page */
            if(_defaultText != null)
                addContent(_defaultText.toString());
            return SKIP_BODY;
        }
        else {
            DataAccessProviderStack.addDataAccessProvider(this, pageContext);
            _containerInPageContext = true;
            return EVAL_BODY_BUFFERED;
        }
    }
903044
public int doAfterBody() throws JspException
    {
        StringBuilderRenderAppender writer = new StringBuilderRenderAppender(_saveBody);
        if (bodyContent != null) {
            String value = bodyContent.getString();
            bodyContent.clearBody();
            if (value == null)
                value = "";
            _saveBody.append(value);
        }

        if (_repeater) {
            ServletRequest req = pageContext.getRequest();
            if (_cr == null)
                _cr = TagRenderingBase.Factory.getConstantRendering(req);
            if (isVertical())
                _cr.end_TD_TR(writer);

            while (((Iterator) _dynamicAttrs).hasNext()) {
                _repCurItem = ((Iterator) _dynamicAttrs).next();
                if (_repCurItem != null) {
                    _repIdx++;
                    if (isVertical())
                        _cr.TR_TD(writer);
                    return EVAL_BODY_AGAIN;
                }
            }
        }

        return SKIP_BODY;
    }