Package org.apache.struts.action

Examples of org.apache.struts.action.ActionMessages


     * @see com.adito.wizard.actions.AbstractWizardAction#unspecified(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
       
        /* If there was an exception loading the keystore, display it as an error */
        ActionMessages errs = new ActionMessages();
        Throwable ex = KeyStoreManager.getInstance(KeyStoreManager.DEFAULT_KEY_STORE).getKeyStoreException();
        if(ex != null) {
            errs.add(Globals.ERROR_KEY, new ActionMessage("installation.selectCertificateSource.error.couldNotLoadKeystore", ex.getMessage()));
            saveErrors(request, errs);
        }
        return super.unspecified(mapping, form, request, response);
    }
View Full Code Here


        try {
            return super.finish(mapping, form, request, response);
        }
        catch(Exception e) {
          log.error("Failed to configure user database.", e);
            ActionMessages errs = new ActionMessages();
            errs.add(Globals.ERROR_KEY, new ActionMessage("installation.configureUserDatabase.error.failedToOpenUserDatabase", e.getMessage()));
            saveErrors(request, errs);
            return mapping.getInputForward();
        }
    }
View Full Code Here

        try {
            return super.next(mapping, form, request, response);
        }
        catch(Exception e) {
          log.error("Failed to open user database.", e);
            ActionMessages errs = new ActionMessages();
            errs.add(Globals.ERROR_KEY, new ActionMessage("installation.configureUserDatabase.error.failedToOpenUserDatabase", e.getMessage()));
            saveErrors(request, errs);
            return mapping.getInputForward();
        }
    }
View Full Code Here

    public ActionForward previous(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        try {
            return super.previous(mapping, form, request, response);
        }
        catch(Exception e) {
            ActionMessages errs = new ActionMessages();
            errs.add(Globals.ERROR_KEY, new ActionMessage("installation.configureUserDatabase.error.failedToOpenUserDatabase", e.getMessage()));
            saveErrors(request, errs);
            return mapping.getInputForward();
        }
    }
View Full Code Here

                            + "&adito=' + escape(window.location.protocol + '//' + "
                            + "window.location.host + ':' + window.location.port)," + "'_blank'," +
                            "'" + (windowParsed == null ? "" : windowParsed) + "');myRef.focus();";
        }

      ActionMessages msgs = new ActionMessages();
      msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage(ApplicationsPlugin.MESSAGE_RESOURCES_KEY, "launchApplication.launched", shortcut.getResourceName()));
     
      if(request != null) {
        request.setAttribute(Constants.REQ_ATTR_FORWARD_TO,
            RedirectWithMessages.addMessages(request, Globals.MESSAGE_KEY, msgs, returnTo) );
        request.setAttribute(Constants.REQ_ATTR_FOLDER, "");
View Full Code Here

                } else {

                    int logonStatus = LogonControllerFactory.getInstance().hasClientLoggedOn(request, response);
                    if (logonStatus == LogonController.INVALID_TICKET) {
                        ActionMessages msgs = new ActionMessages();
                        msgs.add(Globals.ERROR_KEY, new ActionMessage("login.invalidTicket"));
                        saveErrors(request, msgs);
                    } else if (logonStatus == LogonController.LOGGED_ON) {

                        User currentUser = LogonControllerFactory.getInstance().getUser(request);
View Full Code Here

    protected void saveError(HttpServletRequest request, String message ) {
        saveMessage(request, message, "");
    }
   
    protected void saveError(HttpServletRequest request, String message, Object... objects) {
        ActionMessages actionMessages = new ActionMessages();
        actionMessages.add(Globals.ERROR_KEY, new ActionMessage(message, objects));
        saveErrors(request, actionMessages);
    }
View Full Code Here

    private void performShutdown(HttpServletRequest request, ShutdownForm shutdownForm) throws Exception {
        final boolean restart = "restart".equals(shutdownForm.getShutdownOperation());
        if (restart) {
            if (!ContextHolder.getContext().isRestartAvailableMode()) {
                ActionMessages msgs = new ActionMessages();
                msgs.add(Globals.ERROR_KEY, new ActionMessage("server.not.service"));
                saveErrors(request, msgs);
            } else {
                doShutdown(request, shutdownForm, restart);
            }
        } else {
View Full Code Here

    protected void saveMessage(HttpServletRequest request, String message ) {
        saveMessage(request, message, "");
    }

    protected void saveMessage(HttpServletRequest request, String message, Object... objects) {
        ActionMessages actionMessages = new ActionMessages();
        actionMessages.add(Globals.MESSAGE_KEY, new ActionMessage(message, objects));
        saveErrors(request, actionMessages);
    }
View Full Code Here

            transaction = new DAVTransaction(req, res);
            DAVProcessor processor = null;
            try {
                processor = DAVServlet.getDAVProcessor(req);
            } catch (CoreException e) {
                ActionMessages mesgs = (ActionMessages) request.getAttribute(Globals.ERROR_KEY);
                if (mesgs == null) {
                    mesgs = new ActionMessages();
                    request.setAttribute(Globals.ERROR_KEY, mesgs);
                }
                mesgs.add(Globals.MESSAGE_KEY, e.getBundleActionMessage());
                return;
            } catch (Exception e1) {
                throw new IOException(e1.getMessage());
            }
View Full Code Here

TOP

Related Classes of org.apache.struts.action.ActionMessages

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.