Package org.apache.struts.action

Examples of org.apache.struts.action.ActionMappings


            }
            return;
        }

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        ActionFormBean formBean =
            formBeans.findFormBean(mapping.getName());
        if (formBean == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.formBean", mapping.getName()));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Calculate the required values
        name = mapping.getName();
        scope = mapping.getScope();
        servlet = mappings.getServlet();
        type = formBean.getType();

    }
View Full Code Here


                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findForward(forward);
        } else if (mapping != null) {
            selector = mapping;
            ActionMappings collection = (ActionMappings)
                pageContext.getAttribute(Action.MAPPINGS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findMapping(mapping);
        }
        if (object == null) {
            JspException e = new JspException
                (messages.getMessage("struts.missing", selector));
            RequestUtils.saveException(pageContext, e);
View Full Code Here

            }
            return;
        }

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
View Full Code Here

            }
            return;
        }

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        ActionFormBean formBean =
            formBeans.findFormBean(mapping.getName());
        if (formBean == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.formBean", mapping.getName()));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Calculate the required values
        name = mapping.getName();
        scope = mapping.getScope();
        servlet = mappings.getServlet();
        type = formBean.getType();

    }
View Full Code Here

                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findForward(forward);
        } else if (mapping != null) {
            selector = mapping;
            ActionMappings collection = (ActionMappings)
                pageContext.getAttribute(Action.MAPPINGS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findMapping(mapping);
        }
        if (object == null) {
            JspException e = new JspException
                (messages.getMessage("struts.missing", selector));
            RequestUtils.saveException(pageContext, e);
View Full Code Here

            }
            return;
        }

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
View Full Code Here

                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findForward(forward);
        } else if (mapping != null) {
            selector = mapping;
            ActionMappings collection = (ActionMappings)
                pageContext.getAttribute(Action.MAPPINGS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findMapping(mapping);
        }
        if (object == null) {
            JspException e = new JspException
                (messages.getMessage("struts.missing", selector));
            RequestUtils.saveException(pageContext, e);
View Full Code Here

     *
     * @param path Request path for which a mapping is requested
     */
    public ActionMapping getActionMapping(String path) {

        ActionMappings mappings = getActionMappings();

        if (mappings == null)
            return null;
        return mappings.findMapping(path);

    }
View Full Code Here

     *
     * @param path Request path for which a mapping is requested
     */
    public ActionMapping getActionMapping(String path) {

        ActionMappings mappings = getActionMappings();

        if (mappings==null)
            return null;
        return mappings.findMapping(path);

    }
View Full Code Here

     *
     * @param path Request path for which a mapping is requested
     */
    public ActionMapping getActionMapping(String path) {

        ActionMappings mappings = getActionMappings();

        if (mappings==null)
            return null;
        return mappings.findMapping(path);

    }
View Full Code Here

TOP

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

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.