Process the start of the Button.
@throws javax.servlet.jsp.JspException if a JSP exception has occurred
436891
public int doStartTag() throws JspException
    {
        // we assume that tagId will over have override id if both are defined.
        if (_state.id != null) {
            _idScript = renderNameAndId((HttpServletRequest) pageContext.getRequest(), _state, null);
        }

        // render the header...
        _writer = new WriteRenderAppender(pageContext);
        _br = TagRenderingBase.Factory.getRendering(TagRenderingBase.BODY_TAG, pageContext.getRequest());
        _br.doStartTag(_writer, _state);

        return EVAL_BODY_INCLUDE;
    }
460005
public void actionDelete() throws JspException {

        // save initialized instance of this class in request attribute for included sub-elements
        getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
        try {
            boolean isFolder = false;
            if (!isMultiOperation()) {
                isFolder = getCms().readResource(getParamResource(), CmsResourceFilter.ALL).isFolder();
            }
            if (performDialogOperation()) {
                // if no exception is caused and "true" is returned delete operation was successful
                if (isMultiOperation() || isFolder) {
                    // set request attribute to reload the explorer tree view
                    List<String> folderList = new ArrayList<String>(1);
                    folderList.add(CmsResource.getParentFolder(getResourceList().get(0)));
                    getJsp().getRequest().setAttribute(REQUEST_ATTRIBUTE_RELOADTREE, folderList);
                }
                actionCloseDialog();
            } else {
                // "false" returned, display "please wait" screen
                getJsp().include(FILE_DIALOG_SCREEN_WAIT);
            }
        } catch (Throwable e) {
            // prepare common message part
            includeErrorpage(this, e);
        }
    }
1210517
private JButton getStartSessionButton() {
		if (startSessionButton == null) {
			startSessionButton = new JButton();
			startSessionButton.setText(Constant.messages.getString("database.newsession.button.start"));
			startSessionButton.setEnabled(false);
			startSessionButton.addActionListener(new java.awt.event.ActionListener() { 
				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {    
				    PersistSessionDialog.this.dispose();
				}
			});

		}
		return startSessionButton;
	}
294363
public void doProcess(BasicServlet servlet, HttpServletRequest req, HttpServletResponse res, PrintWriter out) 
        throws ServletException, IOException
    {
        super.doProcess(servlet, req, res, out);
    }
626015
public void start() {
        if (!isStarted()) {
            if (getEndpointConfiguration().getWebDriver() != null) {
                webDriver = getEndpointConfiguration().getWebDriver();
            } else if (StringUtils.hasText(getEndpointConfiguration().getRemoteServerUrl())) {
                webDriver = createRemoteWebDriver(getEndpointConfiguration().getBrowserType(), getEndpointConfiguration().getRemoteServerUrl());
            } else {
                webDriver = createLocalWebDriver(getEndpointConfiguration().getBrowserType());
            }

            if (!CollectionUtils.isEmpty(getEndpointConfiguration().getEventListeners())) {
                EventFiringWebDriver wrapper = new EventFiringWebDriver(webDriver);
                log.info("Add event listeners to web driver: " + getEndpointConfiguration().getEventListeners().size());
                for (WebDriverEventListener listener : getEndpointConfiguration().getEventListeners()) {
                    wrapper.register(listener);
                }
            }
        } else {
            log.warn("Browser already started");
        }
    }
242462
public int doEndTag() throws JspException
    {
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        String idScript = null;

        // Create an appropriate "form" element based on our parameters
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        ServletContext servletContext = pageContext.getServletContext();

        // if we have an Id or a tag is forcing the name, then set the state and generate
        // the JavaScript
        if (_state.id != null || _setRealName) {
            String id = _state.id;
            _state.name = _realName;
            _state.id = _realName;
            idScript = renderNameAndId(request, id);
        }

        if (_state.method == null)
            _state.method = FORM_POST;

        // Encode the action
        // If the rewritten form action contains request parameters, turn them into hidden fields --
        // it's not legal to include them in the action URI on a GET.
        HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();

        if (_actionUrl != null) {
            _state.action = response.encodeURL(_actionUrl);
        }

        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.FORM_TAG, request);
        br.doStartTag(writer, _state);

        // If the action we're submitting to is checking for double-submits, save a token in the session.
        // This will be written out as a hidden param (below), and will be checked in PageFlowRequestProcessor.
        String token = PageFlowTagUtils.getToken(request, _mapping);

        // Add a transaction token (if present in our session)
        HttpSession session = pageContext.getSession();
        if (session != null) {
            if (token == null) {
                token = (String) session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
            }
            if (token != null) {
                String name = URLRewriterService.getNamePrefix(servletContext, request, Constants.TOKEN_KEY)
                              + Constants.TOKEN_KEY;
                writeHiddenParam(name, token, writer, request, true);
            }
        }

        // add a hidden value for each parameter
        if (_params != null) {
            Iterator paramKeys = _params.keySet().iterator();
            while (paramKeys.hasNext()) {
                Object paramKey = paramKeys.next();
                Object paramValue = _params.get(paramKey);
                if (paramValue instanceof String[]) {
                    String[] paramValArray = (String[]) paramValue;
                    for (int i = 0; i < paramValArray.length; i++) {
                        String name = paramKey.toString();
                        String paramName = URLRewriterService.getNamePrefix(servletContext, request, name) + name;
                        writeHiddenParam(paramName, paramValArray[i], writer, request, true);
                    }
                }
                else {
                    String name = paramKey.toString();
                    String paramName = URLRewriterService.getNamePrefix(servletContext, request, name) + name;
                    writeHiddenParam(paramName, paramValue.toString(), writer, request, true);
                }
            }
        }

        // add the extra hidden parameters
        if (_extraHiddenParams != null && _extraHiddenParams.size() > 0) {
            for (Iterator i = _extraHiddenParams.keySet().iterator(); i.hasNext();) {
                String name = (String) i.next();
                for (Iterator j = ((List)_extraHiddenParams.get(name)).iterator(); j.hasNext();) {
                    String value = (String) j.next();
                    writeHiddenParam(name, value, writer, request, true);
                }
            }
        }

        // add the body content
        if (_text != null)
            write(_text);

        // Remove the page scope attributes we created
        pageContext.removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE);
        pageContext.removeAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE);
        ImplicitObjectUtil.unloadActionForm(pageContext);

        // Render a tag representing the end of our current form
        br.doEndTag(writer);

        // Render JavaScript to set the input focus if required
        if ((_focus != null) && (_focusMap != null)) {
            String focusName = (String) _focusMap.get(_focus);

            if (focusName != null) {
                String formName = _realName;
                ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
                srs.writeFeature(getScriptReporter(), writer, CoreScriptFeature.SET_FOCUS, false, true,
                        new Object[]{formName, focusName});
            }
        }

        if (_formSubmit) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            srs.writeFeature(getScriptReporter(), writer, CoreScriptFeature.ANCHOR_SUBMIT, true, false, null);
        }

        // output any generated javascript
        if (idScript != null)
            write(idScript);

        localRelease();
        return EVAL_PAGE;
    }
440409
private void doProcessNext()
	{
		int _position = getPosition();
		Node _current = getSource().item(_position);

		if (getActionPool().containsKey(_current.getNodeName()))
		{
			getActionPool().get(_current.getNodeName()).execute(_current, _position);
		}
		else if (getActionPool().containsKey(NODE_NAME__DEFAULT))
		{
			getActionPool().get(NODE_NAME__DEFAULT).execute(_current, _position);
		}
		// else do nothing...

		// done
		_position++;
		setPosition(_position);
	}
927764
protected void init() throws JspException {

        // initialize OpenCms access objects
        m_controller = CmsFlexController.getController(pageContext.getRequest());
        m_cms = m_controller.getCmsObject();

        try {
            // get the resource name from the selected container
            m_element = OpenCms.getADEManager().getCurrentElement(pageContext.getRequest());
            m_element.initResource(m_cms);
            if (m_cms.getRequestContext().getCurrentProject().isOnlineProject()
                && !m_element.isReleasedAndNotExpired()) {
                throw new CmsException(
                    Messages.get().container(
                        Messages.ERR_RESOURCE_IS_NOT_RELEASE_OR_EXPIRED_1,
                        m_element.getResource().getRootPath()));
            }
            if (m_locale == null) {
                // no locale set, use locale from users request context
                m_locale = m_cms.getRequestContext().getLocale();
            }

            // load content and store it
            CmsJspContentAccessBean bean;
            if ((m_element.isInMemoryOnly() || m_element.isTemporaryContent())
                && (m_element.getResource() instanceof CmsFile)) {
                I_CmsXmlDocument xmlContent = CmsXmlContentFactory.unmarshal(
                    m_cms,
                    m_element.getResource(),
                    pageContext.getRequest());
                bean = new CmsJspContentAccessBean(m_cms, m_locale, xmlContent);
            } else {
                bean = new CmsJspContentAccessBean(m_cms, m_locale, m_element.getResource());
            }
            storeAttribute(getVar(), bean);

            if (m_value != null) {
                // if the optional "val" parameter has been set, store the value map of the content in the page context scope
                storeAttribute(getVal(), bean.getValue());
            }

            if (m_rdfa != null) {
                // if the optional "rdfa" parameter has been set, store the rdfa map of the content in the page context scope
                storeAttribute(getRdfa(), bean.getRdfa());
            }

        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
            m_controller.setThrowable(e, m_cms.getRequestContext().getUri());
            throw new JspException(e);
        }
    }
364636
protected synchronized void doStart()
        throws Exception
    {
        if (isStarted())
            return;
        
        _contextLog = LogFactory.getLog("org.browsermob.proxy.jetty.jetty.context."+getHttpContext().getHttpContextName());
        
        if (_contextLog==null)
            _contextLog=log;
        
        if (_sessionManager!=null)
            _sessionManager.start();
        
        // Initialize classloader
        _loader=getHttpContext().getClassLoader();

        if (_autoInitializeServlets)
            initializeServlets();
    }
428089
public void doProcess(BasicServlet servlet, HttpServletRequest req, HttpServletResponse res, PrintWriter outExt) 
        throws ServletException, IOException
    {
    	ScreenModel screen = this.doProcessInput(servlet, req, res);
    	this.doProcessOutput(servlet, req, res, outExt, screen);
    }
488631
public synchronized void start() throws Exception
    {
        try
        {
            if (isStarted()) return;

            open();

            _running = true;
            _acceptor = new Acceptor[_acceptors];
            for (int a = 0; a < _acceptor.length; a++)
            {
                _acceptor[a] = new Acceptor();
                _acceptor[a].setDaemon(isDaemon());
                _acceptor[a].start();
            }

            super.start();
        }
        catch (Exception e)
        {
            log.warn("Failed to start: " + this);
            throw e;
        }
    }
1348076
@Override
	public int doStartTag()
			throws JspException
	{
		// Retrieve the action bean and event handler to secure.

		ActionBean actionBean;
		if (bean == null)
		{
			// Search in page, request, session (if valid) and application scopes, in that order.
			actionBean = (ActionBean)pageContext.findAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN);
			LOG.debug("Determining access for the action bean of the form: ", actionBean);
		}
		else
		{
			// Search in page, request, session (if valid) and application scopes, in that order.
			actionBean = (ActionBean)pageContext.findAttribute(bean);
			LOG.debug("Determining access for action bean \"", bean, "\": ", actionBean);
		}
		if (actionBean == null)
		{
			throw new StripesJspException(
					"Could not find the action bean. This means that either you specified the name \n" +
					"of a bean that doesn't exist, or this tag is not used inside a Stripes Form.");
		}

		Method handler;
		try
		{
			if (event == null)
			{
				handler = StripesFilter.getConfiguration().getActionResolver().getDefaultHandler(actionBean.getClass());
				LOG.debug("Found a handler for the default event: ", handler);
			}
			else
			{
				handler = StripesFilter.getConfiguration().getActionResolver().getHandler(actionBean.getClass(), event);
				LOG.debug("Found a handler for event \"", event, "\": %s", handler);
			}
		}
		catch (StripesServletException e)
		{
			throw new StripesJspException("Failed to get the handler for the event.", e);
		}

		// Get the judgement of the security manager.

		SecurityManager securityManager = (SecurityManager)pageContext.getAttribute(
				SecurityInterceptor.SECURITY_MANAGER, PageContext.REQUEST_SCOPE);
		boolean haveSecurityManager = securityManager != null;
		boolean eventAllowed;
		if (haveSecurityManager)
		{
			LOG.debug("Determining access using this security manager: ", securityManager);
			eventAllowed = Boolean.TRUE.equals(securityManager.getAccessAllowed(actionBean, handler));
		}
		else
		{
			LOG.debug("There is no security manager; allowing access");
			eventAllowed = true;
		}

		// Show the tag's content (or not) based on this

		//noinspection deprecation
		if (haveSecurityManager && negate)
		{
			LOG.debug("This tag negates the decision of the security manager.");
			eventAllowed = !eventAllowed;
		}

		LOG.debug("Access is ", eventAllowed ? "allowed" : "denied", '.');
		return eventAllowed ? EVAL_BODY_INCLUDE : SKIP_BODY;
	}
1117662
public void start(Resource xmlFile) throws PageException {
	InputStream is = null;
	try {
	    XMLReader xmlReader = XMLUtil.createXMLReader();
	    xmlReader.setContentHandler(this);
	    xmlReader.setErrorHandler(this);
	    xmlReader.parse(new InputSource(is = IOUtil.toBufferedInputStream(xmlFile.getInputStream())));
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}
	finally {
	    IOUtil.closeEL(is);
	}

    }
1067933
public void actionReport() throws JspException {

        // save initialized instance of this class in request attribute for included sub-elements
        getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
        switch (getAction()) {
            case ACTION_CONFIRMED:
            default:
                try {
                    Map params = new HashMap();
                    params.put(PARAM_MODULE, getParamModule());
                    // set style to display report in correct layout
                    params.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW);
                    // set close link to get back to overview after finishing the import
                    params.put(PARAM_CLOSELINK, CmsToolManager.linkForToolPath(getJsp(), "/modules"));
                    // redirect to the report output JSP
                    getToolManager().jspForwardPage(this, DELETE_ACTION_REPORT, params);

                    actionCloseDialog();
                } catch (Throwable e) {
                    // create a new Exception with custom message
                    includeErrorpage(this, e);
                }
                break;
        }
    }
1156398
public int doStartTag() throws JspException
    {

        Tag parentTag = getParent();
        while (!(parentTag instanceof Select)) {
            parentTag = parentTag.getParent();
        }

        if (parentTag == null) {
            //throw error
            String s = Bundle.getString("Tags_SelectOptionNoSelect");
            registerTagError(s, null);
            return SKIP_BODY;
        }

        Select parentSelect = (Select) parentTag;
        boolean repeating = parentSelect.isRepeater();

        // if we find an option inside a select and it's not a repeating select report the error
        if ((parentSelect.getOptionsDataSource() != null) && !repeating) {
            String s = Bundle.getString("Tags_SelectOptionParentHasOptionsDataSource");
            _hasError = true;
            parentSelect.registerTagError(s, null);
            return SKIP_BODY;
        }

        // if we are an option inside a repeating select, we must specify the type of repeater we are.
        if (repeating && _repeatingType == null) {
            String s = Bundle.getString("Tags_SelectRepeatingOptionType");
            _hasError = true;
            parentSelect.registerTagError(s, null);
            return SKIP_BODY;
        }

        if (repeating && !isRenderable(parentSelect)) {
            return SKIP_BODY;
        }

        // Do nothing until doEndTag() is called
        return EVAL_BODY_BUFFERED;
    }
834410
@Override
    public int doEndTag() throws JspException {

        if (m_firstOnPage || m_manualPlacement) {
            // only execute action for the first "editable" tag on the page (include file), or in manual mode
            editableTagAction(pageContext, m_provider, m_mode, m_file);
        }
        if (OpenCms.getSystemInfo().getServletContainerSettings().isReleaseTagsAfterEnd()) {
            // need to release manually, JSP container may not call release as required (happens with Tomcat)
            release();
        }

        return EVAL_PAGE;
    }
297718
public int doEndTag() throws JspException
    {
        ServletRequest req = pageContext.getRequest();

        // Create an appropriate "input" element based on our parameters
        if (_password) {
            _state.type = INPUT_PASSWORD;
        }
        else {
            _state.type = INPUT_TEXT;
        }


        // Create the state for the input tag
        ByRef ref = new ByRef();
        nameHtmlControl(_state, ref);

        _state.disabled = isDisabled();

        // Create the text value of the TextBox
        Object textObject = evaluateDataSource();
        if ((textObject == null) || (textObject.toString().length() == 0)) {
            textObject = _defaultValue;
        }

        // Get the text value for the textbox, the result
        String text = null;
        if (textObject != null) {
            text = formatText(textObject);
            InternalStringBuilder sb = new InternalStringBuilder(text.length() + 16);
            StringBuilderRenderAppender sbAppend = new StringBuilderRenderAppender(sb);
            HtmlUtils.filter(text, sbAppend);
            text = sb.toString();
        }
        _state.value = text;

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

        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // create the input tag.
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_TEXT_TAG, req);
        assert(br != null);

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

        // write any script that needs to be written
        if (!ref.isNull())
            write((String) ref.getRef());

        localRelease();
        return EVAL_PAGE;
    }