@return <code>EVAL_PAGE</code>

@see javax.servlet.jsp.tagext.Tag#doEndTag()

@throws JspException by interface default
556524
@Override
    public int doEndTag() throws JspException {

        ServletRequest req = pageContext.getRequest();
        ServletResponse res = pageContext.getResponse();

        if (CmsFlexController.isCmsRequest(req)) {
            // this will always be true if the page is called through OpenCms
            CmsObject cms = CmsFlexController.getCmsObject(req);
            String target = null;

            // try to find out what to do
            if (m_target != null) {
                // option 1: target is set with "page" or "file" parameter
                target = m_target + getSuffix();
            } else if (m_property != null) {
                // option 2: target is set with "property" parameter
                try {
                    String prop = cms.readPropertyObject(cms.getRequestContext().getUri(), m_property, true).getValue();
                    if (prop != null) {
                        target = prop + getSuffix();
                    }
                } catch (RuntimeException e) {
                    // target must be null
                    target = null;
                } catch (Exception e) {
                    // target will be null
                    e = null;
                }
            } else if (m_attribute != null) {
                // option 3: target is set in "attribute" parameter
                try {
                    String attr = (String)req.getAttribute(m_attribute);
                    if (attr != null) {
                        target = attr + getSuffix();
                    }
                } catch (RuntimeException e) {
                    // target must be null
                    target = null;
                } catch (Exception e) {
                    // target will be null
                    e = null;
                }
            } else {
                // option 4: target might be set in body
                String body = null;
                if (getBodyContent() != null) {
                    body = getBodyContent().getString();
                    if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(body)) {
                        // target IS set in body
                        target = body + getSuffix();
                    }
                    // else target is not set at all, default will be used
                }
            }

            // now perform the include action
            includeTagAction(
                pageContext,
                target,
                m_element,
                null,
                m_editable,
                m_cacheable,
                m_parameterMap,
                CmsRequestUtil.getAtrributeMap(req),
                req,
                res);

            release();
        }

        return EVAL_PAGE;
    }
955936
public static String getAttributeString(Tag tag, String attrName) throws EvaluatorException {
	return getAttributeLiteral(tag, attrName).getString();
    }
372326
public void doTag()
            throws JspException, IOException
    {
        PageContext pageContext = getPageContext();
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.BASE_TAG, request);

        // evaluate the body, this is called basically so any attributes my be applied.
        getBufferBody(false);

        InternalStringBuilder buf = new InternalStringBuilder(64);

        // calculate the href
        buf.append(request.getScheme());
        buf.append("://");
        buf.append(request.getServerName());

        String scheme = request.getScheme();
        int port = request.getServerPort();
        if ("http".equals(scheme) && (80 == port)) {
            //Do nothing
        }
        else if ("https".equals(scheme) && (443 == port)) {
            //Do nothing
        }
        else {
            buf.append(":");
            buf.append(request.getServerPort());
        }
        buf.append(request.getRequestURI());
        _state.href = buf.toString();

        // render the tag.
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        br.doStartTag(writer, _state);
        br.doEndTag(writer);

        // This will produce invalid HTML/XHTML if there are errors
        // because we are going to put markup out into the head.
        if (hasErrors())
            reportErrors();
    }
844597
public int doEndTag() throws JspException
    {
        // if there were errors lets report them.
        if (hasErrors()) {
            reportErrors();
        }

        // Get the script reporter
        IScriptReporter sr = getScriptReporter();
        if (sr != null) {
            //if (!sr.isInitScriptWritten()) {
            //    String s = Bundle.getString("Tags_ClientReqScriptHeader", null);
            //    registerTagError(s, null);
            //}

            // write out any errors
            ErrorHandling.reportCollectedErrors(pageContext, this);

            // write out the script before the end tag.
            sr.writeScript(_writer);

            if (sr instanceof Html) {
                Html htmlSr = (Html) sr;
                if (htmlSr.getIdScope() != null) {
                    htmlSr.endScope(_writer);
                }
            }
        }

        if (_idScript != null)
            write(_idScript);

        _br.doEndTag(_writer);

        // Evaluate the remainder of this page
        localRelease();
        return EVAL_PAGE;
    }
1244625
public int doStartTag() throws JspException {

		String string = null;

		if (srcExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("srcExpr", srcExpr, String.class, this, pageContext);
			setSrc(string);
		}

		if (typeExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("typeExpr", typeExpr, String.class, this,
					pageContext);
			setType(string);
		}

		if (asyncExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("asyncExpr", asyncExpr, String.class, this,
					pageContext);
			setAsync(string);
		}

		if (deferExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("deferExpr", deferExpr, String.class, this,
					pageContext);
			setDefer(string);
		}

		if (useRandomParamExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("useRandomParamExpr", useRandomParamExpr,
					String.class, this, pageContext);
			setUseRandomParam(string);
		}

		return super.doStartTag();
	}
525289
@Override
	public int doEndTag() throws JspException {

		try {

			BinaryResourcesHandler rsHandler = null;
			if ((rsHandler = (BinaryResourcesHandler) pageContext.getServletContext()
					.getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE)) == null)
				throw new IllegalStateException(
						"Binary ResourceBundlesHandler not present in servlet context. Initialization of Jawr either failed or never occurred.");

			JawrConfig jawrConfig = rsHandler.getConfig();
			this.renderer = RendererFactory.getImgRenderer(jawrConfig, isPlainImage());
			this.renderer.renderImage(getImgSrcToRender(), getAttributeMap(), pageContext.getOut());
		} catch (IOException e) {
			throw new JspException(e);
		} finally {
			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}

		return (EVAL_PAGE);
	}
110351
@Override
    public int doStartTag() throws JspException {
        final ParameterizableTag parameterizableTag =
                (ParameterizableTag)
                        TagSupport.findAncestorWithClass(this, ParameterizableTag.class);

        if (parameterizableTag == null) {
            throw new JspException(
                    "the 'param' Tag must have a parent tag that implements ParameterizableTag");
        }

        if (this.name != null) {
            parameterizableTag.addParameter(this.name, this.value);
        }

        return SKIP_BODY;
    }
321970
@SuppressWarnings("unchecked")
	@Override
	public int doStartTag() throws JspException {
		super.doStartTag();

		if(AssertUtils.isNotEmpty(this.url)) {
			final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
			Object object = request.getAttribute(JavascriptIncludeTag.JAVASCRIPT_INCLUDE_URL_TAG);
			List<String> urls;
			
			if(object == null) {
				urls = new ArrayList<String>();
				request.setAttribute(JavascriptIncludeTag.JAVASCRIPT_INCLUDE_URL_TAG, urls);
			} else {
				urls = (List<String>) object;
			}
			
			if(this.appendContext) {
				url = UriUtils.addWebPaths(request.getContextPath(), url); 
			}
			
			// do not add a duplicate url here
			if(!urls.contains(url)) {
				urls.add(url);
			}
			
			return SKIP_BODY;
		}
		
		return EVAL_BODY_BUFFERED;
	}
180381
public int doStartTag()
            throws JspException {

        Tag parent = getParent();
        if (parent != null) {
            String s = Bundle.getString("TempExcp_ContainedTemplate");
            registerTagError(s,null);
            reportErrors();
            _fatalError = true;
            return SKIP_BODY;
        }

        ServletRequest req = pageContext.getRequest();
        _savedContext = (TemplateContext) req.getAttribute(TEMPLATE_SECTIONS);
        TemplateContext ctxt = new TemplateContext();
        req.setAttribute(TEMPLATE_SECTIONS,ctxt);

        return EVAL_BODY_INCLUDE;
    }
385815
public int doStartTag() throws JspException
    {
        Object val = evaluateDataSource();
        _defaultSelections = (List) evaluateDefaultValue();

        // if there were expression errors report them
        if (hasErrors())
            return SKIP_BODY;

        buildMatch(val);
        if (hasErrors())
            return SKIP_BODY;


        _formatters = new ArrayList();
        _optionList = new ArrayList();

        // Walk the options data source
        _dynamicOptions = evaluateOptionsDataSource();
        if (_repeater) {
            _repCurStage = _order[0];
            boolean valid = doRepeaterAfterBody();
            if (!valid)
                return SKIP_BODY;
            DataAccessProviderStack.addDataAccessProvider(this, pageContext);
        }

        // Continue processing this page
        return EVAL_BODY_BUFFERED;
    }
36091
@Override
    public int doStartTag() {

        if (CmsFlexController.isCmsRequest(pageContext.getRequest())) {
            m_paramState = new ParamState(
                CmsFlexController.getController(pageContext.getRequest()).getCurrentRequest());
            m_paramState.init();
        }
        return EVAL_BODY_BUFFERED;
    }
371855
public static Object evaluate(String attributeName,
                                  String expression,
                                  Class expectedType,
                                  PageContext pageContext)
            throws JspException {

        return evaluate(attributeName, expression, expectedType, null, pageContext);
    }
581470
private void evaluateExpressions() throws JspException {
		String string = null;
		Boolean bool = null;
		if (getBase64Expr() != null
				&& (bool = EvalHelper.evalBoolean("base64", getBase64Expr(), this, pageContext)) != null) {
			setBase64(bool);
		}

		if (getAlignExpr() != null
				&& (string = EvalHelper.evalString("align", getAlignExpr(), this, pageContext)) != null) {
			setAlign(string);
		}

		if (getAltExpr() != null && (string = EvalHelper.evalString("alt", getAltExpr(), this, pageContext)) != null) {
			setAlt(string);
		}

		if (getBorderExpr() != null
				&& (string = EvalHelper.evalString("border", getBorderExpr(), this, pageContext)) != null) {
			setBorder(string);
		}

		if (getDirExpr() != null && (string = EvalHelper.evalString("dir", getDirExpr(), this, pageContext)) != null) {
			setDir(string);
		}

		if (getHeightExpr() != null
				&& (string = EvalHelper.evalString("height", getHeightExpr(), this, pageContext)) != null) {
			setHeight(string);
		}

		if (getHspaceExpr() != null
				&& (string = EvalHelper.evalString("hspace", getHspaceExpr(), this, pageContext)) != null) {
			setHspace(string);
		}

		if (getNameExpr() != null
				&& (string = EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
			setName(string);
		}

		if (getIsmapExpr() != null
				&& (string = EvalHelper.evalString("ismap", getIsmapExpr(), this, pageContext)) != null) {
			setIsmap(string);
		}

		if (getLangExpr() != null
				&& (string = EvalHelper.evalString("lang", getLangExpr(), this, pageContext)) != null) {
			setLang(string);
		}

		if (getNameExpr() != null
				&& (string = EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
			setName(string);
		}

		if (getOnclickExpr() != null
				&& (string = EvalHelper.evalString("onclick", getOnclickExpr(), this, pageContext)) != null) {
			setOnclick(string);
		}

		if (getOndblclickExpr() != null
				&& (string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), this, pageContext)) != null) {
			setOndblclick(string);
		}

		if (getOnkeydownExpr() != null
				&& (string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), this, pageContext)) != null) {
			setOnkeydown(string);
		}

		if (getOnkeypressExpr() != null
				&& (string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), this, pageContext)) != null) {
			setOnkeypress(string);
		}

		if (getOnkeyupExpr() != null
				&& (string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), this, pageContext)) != null) {
			setOnkeyup(string);
		}

		if (getOnmousedownExpr() != null
				&& (string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), this, pageContext)) != null) {
			setOnmousedown(string);
		}

		if (getOnmousemoveExpr() != null
				&& (string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), this, pageContext)) != null) {
			setOnmousemove(string);
		}

		if (getOnmouseoutExpr() != null
				&& (string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), this, pageContext)) != null) {
			setOnmouseout(string);
		}

		if (getOnmouseoverExpr() != null
				&& (string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), this, pageContext)) != null) {
			setOnmouseover(string);
		}

		if (getOnmouseupExpr() != null
				&& (string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), this, pageContext)) != null) {
			setOnmouseup(string);
		}

		if (getSrcExpr() != null && (string = EvalHelper.evalString("src", getSrcExpr(), this, pageContext)) != null) {
			setSrc(string);
		}

		if (getStyleExpr() != null
				&& (string = EvalHelper.evalString("style", getStyleExpr(), this, pageContext)) != null) {
			setStyle(string);
		}

		if (getStyleClassExpr() != null
				&& (string = EvalHelper.evalString("styleClass", getStyleClassExpr(), this, pageContext)) != null) {
			setStyleClass(string);
		}

		if (getStyleIdExpr() != null
				&& (string = EvalHelper.evalString("styleId", getStyleIdExpr(), this, pageContext)) != null) {
			setStyleId(string);
		}

		if (getTitleExpr() != null
				&& (string = EvalHelper.evalString("title", getTitleExpr(), this, pageContext)) != null) {
			setTitle(string);
		}

		if (getUsemapExpr() != null
				&& (string = EvalHelper.evalString("usemap", getUsemapExpr(), this, pageContext)) != null) {
			setUsemap(string);
		}

		if (getVspaceExpr() != null
				&& (string = EvalHelper.evalString("vspace", getVspaceExpr(), this, pageContext)) != null) {
			setVspace(string);
		}

		if (getWidthExpr() != null
				&& (string = EvalHelper.evalString("width", getWidthExpr(), this, pageContext)) != null) {
			setWidth(string);
		}
	}
633129
@Override
	public int doEndTag() throws JspException {

		try {
			String imgSrc = getImgSrcToRender();

			if (null == var) {
				try {
					pageContext.getOut().print(imgSrc);
				} catch (IOException e) {
					throw new JspException(e);
				}
			} else {
				pageContext.setAttribute(var, imgSrc);
			}

			return super.doEndTag();

		} finally {

			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}
	}
1214289
public int doEndTag()
            throws JspException
    {

        popIdScope();

        // writeout the script.
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);

        // if we wrote out the scopeId then we end it.
        if (_idScope != null) {
            writer.append("</div>");
        }

        writeFrameworkScript(writer);
        writeAfterBlocks(writer);
        localRelease();
        return EVAL_PAGE;
    }
427922
@Override
    public int doStartTag() throws JspException {

        ServletRequest req = pageContext.getRequest();

        // This will always be true if the page is called through OpenCms
        if (!CmsFlexController.isCmsRequest(req)) {
            return SKIP_BODY;
        }
        if (getJs() == null) {
            if (isDynamic()) {
                // in case we want to include the needed js functions
                try {
                    pageContext.getOut().print("<script type='text/javascript' src='"
                        + CmsWorkplace.getSkinUri()
                        + VFS_PATH_LOAD_JS
                        + "' ></script>");
                } catch (Exception ex) {
                    if (LOG.isErrorEnabled()) {
                        LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "jquery"), ex);
                    }
                    throw new JspException(ex);
                }
            }
            return SKIP_BODY;
        }

        // get the server prefix
        CmsObject cms = CmsFlexController.getCmsObject(req);

        // first handle js file
        String path = VFS_PATH_JQUERY;
        if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
            // online
            path += VFS_PATH_PACKED;
        } else {
            // offline
            path += VFS_PATH_UNPACKED;
        }
        String file = path + getJs() + EXTENSION_JS;
        try {
            cms.readResource(CmsWorkplace.VFS_PATH_RESOURCES + file);
            if (isDynamic()) {
                pageContext.getOut().print("<script type='text/javascript'>load_script('"
                    + CmsWorkplace.getSkinUri()
                    + file
                    + "', 'js');</script>");
            } else {
                pageContext.getOut().print(
                    "<script type='text/javascript' src='" + CmsWorkplace.getSkinUri() + file + "' ></script>");
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled()) {
                LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "jquery"), ex);
            }
            throw new JspException(ex);
        }
        if (getCss() == null) {
            return SKIP_BODY;
        }

        // now handle css file
        path = VFS_PATH_CSS;
        file = path + getCss() + EXTENSION_CSS;
        try {
            cms.readResource(CmsWorkplace.VFS_PATH_RESOURCES + file);
            pageContext.getOut().println();
            if (isDynamic()) {
                pageContext.getOut().print("<script type='text/javascript'>load_script('"
                    + CmsWorkplace.getSkinUri()
                    + file
                    + "', 'css');</script>");
            } else {
                pageContext.getOut().print(
                    "<link href='" + CmsWorkplace.getSkinUri() + file + "' rel='stylesheet' type='text/css' >");
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled()) {
                LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "jquery"), ex);
            }
            throw new JspException(ex);
        }
        return SKIP_BODY;
    }
502436
public int doEndTag() throws JspException
    {
        ServletRequest req = pageContext.getRequest();
        Object textObject = null;

        // Get the value of the data source.  The object will not be null.
        Object val = evaluateDataSource();
        textObject = (val != null) ? val : "";
        assert(textObject != null);

        // setup the rest of the state.
        ByRef ref = new ByRef();
        nameHtmlControl(_state, ref);

        _state.disabled = isDisabled();

        // if there were expression errors report them
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // if there were format errors then report them
        if (_formatErrors) {
            if (bodyContent != null) {
                String value = bodyContent.getString().trim();
                bodyContent.clearBody();
                write(value);
            }
        }

        // create the input tag.
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.TEXT_AREA_TAG, req);
        br.doStartTag(writer, _state);

        // create the text value which will be found inside the textarea.
        if ((textObject == null) || (textObject.toString().length() == 0)) {
            textObject = _defaultValue;
        }

        String text = formatText(textObject);
        if (text != null) {
            // make sure leading blank line in the text value is not interpreted
            // just as formatting... force a new line for formatting
            if (text.startsWith("\n") || text.startsWith("\r")) {
                writer.append("\n");
            }
            HtmlUtils.filter(text, writer);
        }

        //results.append(text);
        br.doEndTag(writer);

        // if there are errors report them...
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // report any script
        if (!ref.isNull())
            write((String) ref.getRef());

        localRelease();
        return EVAL_PAGE;
    }