(non-Javadoc)
@see javax.servlet.jsp.tagext.BodyTagSupport#doStartTag()
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;
	}
587744
@Override
    protected void doStop() throws Exception
    {
        log.info("stopping...");
        if (_client != null)
        {
            _client.shutdown();
            _client = null;
        }
        super.doStop();
        log.info("stopped.");
    }
1011186
@Override
    public int doStartTag() throws JspException {
        if (end != -1 && begin > end) {
            // JSTL 1.1. We simply do not execute the loop.
            return SKIP_BODY;
        }

        // we're beginning a new iteration, so reset our counts (etc.)
        index = 0;
        count = 1;
        last = false;

        // let the subclass conduct any necessary preparation
        prepare();

        // throw away the first 'begin' items (if they exist)
        discardIgnoreSubset(begin);

        // get the item we're interested in
        if (hasNext())
        // index is 0-based, so we don't update it for the first item
        {
            item = next();
        } else {
            return SKIP_BODY;
        }

        /*
         * now discard anything we have to "step" over.
         * (we do this in advance to support LoopTagStatus.isLast())
         */
        discard(step - 1);

        // prepare to include our body...
        exposeVariables();
        calibrateLast();
        return EVAL_BODY_INCLUDE;
    }
576398
public int doStartTag() throws JspException
    {
        ServletRequest req = pageContext.getRequest();
        if (_cr == null)
            _cr = TagRenderingBase.Factory.getConstantRendering(req);

        // get the evaluated dataSource and default values
        Object val = evaluateDataSource();
        _defaultSelections = (List) evaluateDefaultValue();
        if (hasErrors()) {
            return SKIP_BODY;
        }

        // process the default values and create the matching array...
        if (val != null) {
            buildMatch(val);
            if (hasErrors()) {
                return SKIP_BODY;
            }
        }

        // if the checkbox group is disabled do not write out the
        // hidden field.
        _writer = new WriteRenderAppender(pageContext);
        if (!_repeater && !_disabled) {

            //Create hidden field for state tracking
            _state.clear();
            String hiddenParamName = null;
            hiddenParamName = getQualifiedDataSourceName() + OLDVALUE_SUFFIX;
            _state.name = hiddenParamName;
            _state.value = "true";

            TagRenderingBase hiddenTag = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_HIDDEN_TAG, req);
            hiddenTag.doStartTag(_writer, _state);
            hiddenTag.doEndTag(_writer);
        }

        if (isVertical())
            _cr.TABLE(_writer);

        // if this is a repeater then we shouid prime the pump...
        _dynamicAttrs = evaluateOptionsDataSource();
        assert (_dynamicAttrs != null);
        assert (_dynamicAttrs instanceof Map ||
                _dynamicAttrs instanceof Iterator);

        if (_repeater) {
            if (_dynamicAttrs instanceof Map) {
                _dynamicAttrs = ((Map) _dynamicAttrs).entrySet().iterator();
            }
            if (!(_dynamicAttrs instanceof Iterator)) {
                String s = Bundle.getString("Tags_OptionsDSIteratorError");
                registerTagError(s, null);
                return SKIP_BODY;
            }
            while (((Iterator) _dynamicAttrs).hasNext()) {
                _repCurItem = ((Iterator) _dynamicAttrs).next();
                if (_repCurItem != null)
                    break;
            }
            if (isVertical())
                _cr.TR_TD(_writer);

            DataAccessProviderStack.addDataAccessProvider(this, pageContext);
        }
        _saveBody = new InternalStringBuilder(128);

        // Continue processing this page
        return EVAL_BODY_BUFFERED;

    }
265376
@Override
    public String start() {
        if (mConsumed) {
            throw new IllegalStateException("task has been executed already");
        }
        if (Config.DEBUG) {
            Log.v(TAG, "start() " + getName());
        }
        mConsumed = true;
        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                execute();
            }
        };
        final long delayMillis = mInfo.delayMillis;
        if (delayMillis > 0) {
            mInfo.handler.postDelayed(runnable, delayMillis);
        } else {
            runnable.run();
        }
        return getName();
    }
84141
public int doStartTag() throws JspException
    {
        if (_rolloverImage != null && getJavaScriptAttribute(ONMOUSEOVER) == null) {
            // cause the roll over script to be inserted
            WriteRenderAppender writer = new WriteRenderAppender(pageContext);
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState((HttpServletRequest) pageContext.getRequest());
            srs.writeFeature(getScriptReporter(), writer, CoreScriptFeature.ROLLOVER, true, false, null);
        }

        return EVAL_BODY_BUFFERED;
    }
544912
@Override
    public int doEndTag() throws JspException {

        ServletRequest req = pageContext.getRequest();

        // This will always be true if the page is called through OpenCms
        if (CmsFlexController.isCmsRequest(req)) {
            try {
                // Get link-string from the body and reset body
                String link = getBodyContent().getString();
                getBodyContent().clear();
                // Calculate the link substitution
                String newlink = linkTagAction(link, req, getBaseUri(), getDetailPage(), m_locale);
                // Write the result back to the page
                getBodyContent().print(newlink);
                getBodyContent().writeOut(pageContext.getOut());

            } catch (Exception ex) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "link"), ex);
                }
                throw new JspException(ex);
            }
        }
        return EVAL_PAGE;
    }
620546
public int doStartTag() throws JspException
    {
        if (hasErrors())
            return SKIP_BODY;
        
        // Error out if there is a parent form
        if (getNearestForm() != null) {
            registerTagError(Bundle.getString("Tags_FormParentForm"), null);
        }

        // Look up the form bean name, scope, and type if necessary
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        ServletContext servletContext = pageContext.getServletContext();

        // find the beanName, beanType and beanScope
        lookupBeanScopeAndName(request, servletContext);
        if (hasErrors())
            return SKIP_BODY;

        // Generate the real name.  We generate it here so we can return it to any contained tags if
        // they need it.  If they access it, the most likely will cause the realName to be output
        if (_state.id != null) {
            _realName = getIdForTagId(_state.id);
        }
        else {
            String formId = FORM_ID + getNextId(request);
            _realName = getIdForTagId(formId);
        }

        // Store this tag itself as a page attribute
        pageContext.setAttribute(Constants.FORM_KEY, this, PageContext.REQUEST_SCOPE);

        // Locate or create the bean associated with our form
        int scope = PageContext.SESSION_SCOPE;
        if ("request".equals(_beanScope)) {
            scope = PageContext.REQUEST_SCOPE;
        }

        // setup the Bean
        Object bean = null;
        if (_beanName != null)
            bean = pageContext.getAttribute(_beanName, scope);
        if (bean == null) {
            if (_explicitBeanType) {
                // Backwards compatibility - use explicitly specified values
                try {
                    Handlers handlers = Handlers.get(pageContext.getServletContext());
                    bean = handlers.getReloadableClassHandler().newInstance(_beanType);
                    if (bean != null) {
                        ((ActionForm) bean).setServlet(_servlet);
                    }
                }
                catch (Exception e) {
                    registerTagError(Bundle.getString("Tags_FormNameBadType"), e);
                }
            }
            else {
                // New and improved - use the values from the action mapping
                
                // First, check to see if this is a page flow-scoped form bean.  If so, use the current value
                // from the member field in the page flow (or shared flow).
                if (_flowController != null) {
                    bean = _flowController.getFormBean(_mapping);
                }

                if (bean == null) {
                    bean = InternalUtils.createActionForm(_mapping, _appConfig, _servlet, servletContext);
                }
            }

            if (hasErrors())
                return SKIP_BODY;

            // Call the reset method if we have an ActionForm
            if (bean instanceof ActionForm) {
                ((ActionForm) bean).reset(_mapping, request);
            }
            if (bean != null) {
                pageContext.setAttribute(_beanName, bean, scope);
            }
        }
        if (bean != null) {
            pageContext.setAttribute(Constants.BEAN_KEY, bean, PageContext.REQUEST_SCOPE);
            ImplicitObjectUtil.loadActionForm(pageContext, bean);
        }
        
        // Create the action URL here, so child tags can access it.
        try {
            HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
            _extraHiddenParams = new LinkedHashMap/*<String, List<String>>*/();
            _actionUrl = rewriteActionURL(servletContext, request, response, _extraHiddenParams);
        }
        catch (URISyntaxException e) {
            // report the error...
            logger.error(Bundle.getString("Tags_URISyntaxException"));
            String s = Bundle.getString("Tags_Form_URLException",
                    new Object[]{_state.action, e.getMessage()});
            registerTagError(s, e);
        }

        // Continue processing this page
        return EVAL_BODY_BUFFERED;
    }
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();
	}
241190
@Override
    public int doStartTag() throws JspException {

        Tag parent;

        // make sure we're contained properly
        if (!((parent = getParent()) instanceof ChooseTag)) {
            throw new JspTagException(
                    Resources.getMessage("WHEN_OUTSIDE_CHOOSE"));
        }

        // make sure our parent wants us to continue
        if (!((ChooseTag) parent).gainPermission()) {
            return SKIP_BODY;
        }                   // we've been reeled in

        // handle conditional behavior
        if (condition()) {
            ((ChooseTag) parent).subtagSucceeded();
            return EVAL_BODY_INCLUDE;
        } else {
            return SKIP_BODY;
        }
    }
296698
@Override
	public void printContentStart(
		ChainWriter out,
		WebSiteRequest req,
		HttpServletResponse resp
	) throws IOException, SQLException {
		out.print(getDescription());
	}
971856
public void printDataStartField(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
        {
        }
        else 
            out.println("<tr>");
    }
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;
    }
622665
public int doStartTag() throws JspException
    {
        JspTag parentTag = SimpleTagSupport.findAncestorWithClass(this, IUrlParams.class);
        if (parentTag == null) {
            String msg = Bundle.getString("Tags_InvalidParameterParent");
            registerTagError(msg, null);
            reportErrors();
        }
        else {
            IUrlParams parent = (IUrlParams) parentTag;
            parent.addParameter(_name, _value, null);
        }
        localRelease();
        return SKIP_BODY;
    }
749589
public int doStartTag() throws JspException
    {
        IScriptReporter sr = getScriptReporter();
        HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);

        // write out the include
        ScriptTag.State state = new ScriptTag.State();
        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, pageContext.getRequest());

        state.src = req.getContextPath() + "/resources/beehive/version1/javascript/netui-tree.js";
        br.doStartTag(writer, state);
        br.doEndTag(writer);

        // write out the dynamic content
        ScriptRequestState srs = ScriptRequestState.getScriptRequestState(req);
        srs.writeFeature(sr, writer, CoreScriptFeature.DYNAMIC_INIT, true, false, new Object[]{req.getContextPath()});

        return EVAL_BODY_INCLUDE;
    }
50120
public int doEndTag() throws JspException
    {
        Object val = evaluateDataSource();

        ServletRequest req = pageContext.getRequest();

        if (_dataInput != null) {
            val = _dataInput.toString();
        }

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

        if (val != null) {
            _value = val.toString();
        }

        // Create an appropriate "input" element based on our parameters
        ByRef ref = new ByRef();
        nameHtmlControl(_state, ref);

        if (_value != null) {
            InternalStringBuilder sb = new InternalStringBuilder(_value.length() + 16);
            StringBuilderRenderAppender sbAppend = new StringBuilderRenderAppender(sb);
            HtmlUtils.filter(_value, sbAppend);
            _state.value = sb.toString();
        }

        // correct for null text here
        if (_state.value == null)
            _state.value = "";

        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        TagRenderingBase hiddenTag = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_HIDDEN_TAG, req);

        hiddenTag.doStartTag(writer, _state);
        hiddenTag.doEndTag(writer);

        if (!ref.isNull())
            write((String) ref.getRef());

        // Continue processing this page
        localRelease();
        return SKIP_BODY;
    }
342295
@Override
    public void writeStartTagStart(String localName)
        throws IOException, XMLStreamException
    {
        if (mCheckNames) {
            verifyNameValidity(localName, mNsAware);
        }

        int ptr = mOutputPtr;
        int extra = (mOutputBufLen - ptr) - (1 + localName.length());
        if (extra < 0) { // split on boundary, slower
            fastWriteRaw('<');
            fastWriteRaw(localName);
        } else {
            char[] buf = mOutputBuffer;
            buf[ptr++] = '<';
            int len = localName.length();
            localName.getChars(0, len, buf, ptr);
            mOutputPtr = ptr+len;
        }
    }