/*
(non-Javadoc)

@see net.jawr.web.taglib.AbstractResourceBundleTag#doStartTag()
174772
@Override
	public int doStartTag() throws JspException {

		String string = null;
		Boolean bool = null;

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

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

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

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

		if (alternateExpr != null) {
			bool = (Boolean) ExpressionEvaluatorManager.evaluate("alternateExpr", alternateExpr, Boolean.class, this,
					pageContext);
			setAlternate(bool);
		}

		if (displayAlternateExpr != null) {
			bool = (Boolean) ExpressionEvaluatorManager.evaluate("displayAlternateExpr", displayAlternateExpr,
					Boolean.class, this, pageContext);
			setAlternate(bool);
		}

		return super.doStartTag();
	}
1332356
public int doStartTag() throws JspException {
      try {
	SPathFilter s = new SPathFilter(new SPathParser(select).expression());
	pageContext.setAttribute(var, s);
	return SKIP_BODY;
      } catch (ParseException ex) {
	throw new JspTagException(ex.toString(), ex);
      }
    }
1343072
@Override
    protected void doStart() {
        try {
            String build = _configuration.getValue(SystemConfiguration.Property.BUILD);
            String version = _configuration.getValue(SystemConfiguration.Property.VERSION);
            String year = new SimpleDateFormat("yyyy").format(new Date());

            _log.info("Argus version {} build {}.", version, build);
            _log.info("Copyright Salesforce.com, {}.", year);
            _log.info("{} started.", getName());
            _persistService.start();
            _serviceFactory.getUserService().findAdminUser();
            _serviceFactory.getUserService().findDefaultUser();
        } catch (Throwable ex) {
            _log.error(getName() + " startup aborted.", ex);
        } finally {
            _mergeServiceConfiguration();
            _mergeNotifierConfiguration();
            _log.info(_configuration.toString());
        }
    }
834889
void sendDeltaStartWorkRejected()
   {
      startWorkRejected.incrementAndGet();

      if (trace)
         log.tracef("sendDeltaStartWorkRejected: %s", workManagers);

      if (own != null && transport != null && transport.isInitialized())
      {
         for (Address address : workManagers)
         {
            if (!own.equals(address))
               transport.deltaStartWorkRejected(address);
         }
      }
   }
1039679
public void doStartup(ConfigurationProvider cp, boolean isSQLRecoveryLog) {
        if (tc.isDebugEnabled())
            Tr.debug(tc, "doStartup with cp: " + cp + " and flag: " + isSQLRecoveryLog);

        // Create an AppId that will be unique for this server to be used in the generation of Xids.

        // Locate the user directory in the Liberty install
        String userDirEnv = System.getenv("WLP_USER_DIR");

        if (tc.isDebugEnabled())
            Tr.debug(tc, "TMS, WLP_USER_DIR env variable is - " + userDirEnv);
        // Retrieve the server name.
        String serverName = cp.getServerName();

        if (tc.isDebugEnabled())
            Tr.debug(tc, "TMS, serverName is - " + serverName);
        // Retrieve the host name
        String hostName = "";
        hostName = AccessController.doPrivileged(new PrivilegedAction<String>() {
            @Override
            public String run() {

                String theHost = "";
                try {
                    InetAddress addr = InetAddress.getLocalHost();
                    theHost = addr.getCanonicalHostName().toLowerCase();
                } catch (UnknownHostException e) {
                    theHost = "localhost";
                }

                return theHost;
            }
        });

        byte[] theApplId = createApplicationId(userDirEnv, serverName, hostName);
        cp.setApplId(theApplId);
        if (tc.isDebugEnabled())
            Tr.debug(tc, "TMS, cp - " + cp + " set applid - " + Util.toHexString(theApplId));
        if (!xaFlowCallbacksInitialised) {
            // -------------------------------------------------------
            // Initialize the XA Flow callbacks by
            // attempting to load the test class.
            // -------------------------------------------------------
            if (tc.isDebugEnabled())
                Tr.debug(tc, "initialise the XA Flow callbacks");
            XAFlowCallbackControl.initialize();
            xaFlowCallbacksInitialised = true;
        }
        if (cp.isRecoverOnStartup()) {
            try {
                TMHelper.start(cp.isWaitForRecovery());
            } catch (Exception e) {
                FFDCFilter.processException(e, "com.ibm.ws.transaction.services.TransactionManagerService.doStartup", "60", this);
            }
        }
    }
800730
public void startUpdate(String targetId) throws IOException {
        startChangesIfNecessary();
        inUpdate = true;
        ResponseWriter writer = getWrapped();
        writer.startElement("update", null);
        writer.writeAttribute("id", targetId, null);
        writer.startCDATA();
    }
1196267
public int doStartTag()
            throws JspException {

        if (!_visible)
            return SKIP_BODY;

        // If the parent is a DivPanel then this section will be inlined.
        Tag parentTag = getParent();
        // If the parent tag is a repeater then we must insure that the parent of that is a DivPanel
        if (parentTag instanceof Repeater) {
            parentTag = parentTag.getParent();
            if (!(parentTag instanceof DivPanel)) {
                String s = Bundle.getString("Temp_SectionInRepeater");
                registerTagError(s,null);
                reportErrors();
                localRelease();
                return EVAL_PAGE;
             }
        }
        if (parentTag instanceof DivPanel) {
            InternalStringBuilder results = new InternalStringBuilder(128);
            results.append("<div ");
            renderTagId(results);
            if (hasErrors()) {
                reportErrors();
                localRelease();
                return EVAL_PAGE;
            }
            results.append(">");
            ResponseUtils.write(pageContext,results.toString());
            return EVAL_BODY_BUFFERED;
        }

        return EVAL_BODY_BUFFERED;
    }
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;
    }
19077
public void init(JavacTask task, String[] args, boolean addTaskListener) {
        env = new Env();
        for (int i = 0; i < args.length; i++) {
            String arg = args[i];
            if (arg.equals(XMSGS_OPTION)) {
                env.messages.setOptions(null);
            } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
                env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
            } else if (arg.matches(XIMPLICIT_HEADERS + "[1-6]")) {
                char ch = arg.charAt(arg.length() - 1);
                env.setImplicitHeaders(Character.digit(ch, 10));
            } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
                env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
            } else
                throw new IllegalArgumentException(arg);
        }
        env.init(task);

        checker = new Checker(env);

        if (addTaskListener) {
            final DeclScanner ds = new DeclScanner() {
                @Override
                void visitDecl(Tree tree, Name name) {
                    TreePath p = getCurrentPath();
                    DocCommentTree dc = env.trees.getDocCommentTree(p);

                    checker.scan(dc, p);
                }
            };

            TaskListener tl = new TaskListener() {
                @Override
                public void started(TaskEvent e) {
                    switch (e.getKind()) {
                        case ANALYZE:
                            CompilationUnitTree tree;
                            while ((tree = todo.poll()) != null)
                                ds.scan(tree, null);
                            break;
                    }
                }

                @Override
                public void finished(TaskEvent e) {
                    switch (e.getKind()) {
                        case PARSE:
                            todo.add(e.getCompilationUnit());
                            break;
                    }
                }

                Queue<CompilationUnitTree> todo = new LinkedList<CompilationUnitTree>();
            };

            task.addTaskListener(tl);
        }
    }
1145928
protected XMLEvent readStartTag(XMLEventReader reader, QName tagName)
            throws XMLStreamException, JournalException {
        XMLEvent event = reader.nextTag();
        if (!isStartTagEvent(event, tagName)) {
            throw getNotStartTagException(tagName, event);
        }
        return event;
    }
30252
function getStartToken(elementNode) {
                if (!elementNode) {
                    return null
                }
                if (elementNode.type !== "HTMLElement") {
                    return null
                }
                if (isDummyElement(elementNode)) {
                    return null
                }
                return elementNode.startTag || elementNode
            }
1320388
@Override
    public int doStartTag() throws JspException {
        // Sanity check
        if (context != null
                && (!context.startsWith("/") || !url.startsWith("/"))) {
            throw new JspTagException(
                    Resources.getMessage("IMPORT_BAD_RELATIVE"));
        }

        // reset parameter-related state
        urlWithParams = null;
        params = new ParamSupport.ParamManager();

        // check the URL
        if (url == null || url.equals("")) {
            throw new NullAttributeException("import", "url");
        }

        // Record whether our URL is absolute or relative
        isAbsoluteUrl = UrlUtil.isAbsoluteUrl(url);

        try {
            // If we need to expose a Reader, we've got to do it right away
            if (varReader != null) {
                r = acquireReader();
                pageContext.setAttribute(varReader, r);
            }
        } catch (IOException ex) {
            throw new JspTagException(ex.toString(), ex);
        }

        return EVAL_BODY_INCLUDE;
    }
1291411
private void doWriteStartElement(String localName)
        throws XMLStreamException
    {
        mAnyOutput = true;
        // Need to finish an open start element?
        if (mStartElementOpen) {
            closeStartElement(mEmptyElement);
        } else if (mState == STATE_PROLOG) {
            // 20-Dec-2005, TSa: Does this match DOCTYPE declaration?
            verifyRootElement(localName, null);
        } else if (mState == STATE_EPILOG) {
            if (mCheckStructure) {
                reportNwfStructure(ErrorConsts.WERR_PROLOG_SECOND_ROOT, localName);
            }
            // Outputting fragment? Better reset to tree, then...
            mState = STATE_TREE;
        }

        /* Note: need not check for CONTENT_ALLOW_NONE here, since the
         * validator should handle this particular case...
         */
        /*if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { // EMPTY content
            reportInvalidContent(START_ELEMENT);
            }*/
        if (mValidator != null) {
            mValidator.validateElementStart(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
        }       

        mStartElementOpen = true;
        mElements.addString(localName);
        try {
            mWriter.writeStartTagStart(localName);
        } catch (IOException ioe) {
            throwFromIOE(ioe);
        }
    }
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;
    }
61760
public void enableStart() {
    EventTarget targ = (EventTarget) element;
    targ.addEventListener(SVGConstants.SVG_EVENT_MOUSEDOWN, this, false);
  }
1144022
void doBatchStart(String batch, Object args) {
    checkOpen();
    JsonObject message = createMessage(args)
        .putString("batch", batch)
        .putString("action", "startBatch");
    if (open && !paused) {
      if (log.isDebugEnabled()) {
        log.debug(String.format("%s - Batch start: Batch[batch=%s]", this, batch));
      }
      eventBus.send(inAddress, message);
    }
    checkFull();
  }
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;
    }