Package org.apache.struts.config

Examples of org.apache.struts.config.ApplicationConfig


        /* FIXME for Struts 1.2
           Since Struts 1.1 only has one implementation for
           ModuleConfig casting is safe here. Used only for
           transition purposes !
        */
        return new ApplicationConfig((ModuleConfigImpl)getModuleConfig(request));
    }
View Full Code Here


        /* FIXME for Struts 1.2
           Since Struts 1.1 only has one implementation for
           ModuleConfig casting is safe here. Used only for
           transition purposes !
        */
        return new ApplicationConfig((ModuleConfigImpl)initModuleConfig(prefix,path));
    }
View Full Code Here

        ActionFormBean formBean = null;
        ActionForward forward = null;
        ActionMapping mapping = null;

        appConfig = new ApplicationConfig("");
        context.setAttribute(Action.APPLICATION_KEY, appConfig);

        // Forward "external" to "http://jakarta.apache.org/"
        appConfig.addForwardConfig
            (new ActionForward("external", "http://jakarta.apache.org/",
View Full Code Here

    protected void setUpSecondApp() {

        ActionFormBean formBean = null;
        ActionMapping mapping = null;

        appConfig2 = new ApplicationConfig("/2");
        context.setAttribute(Action.APPLICATION_KEY + "/2", appConfig2);

        // Forward "external" to "http://jakarta.apache.org/"
        appConfig2.addForwardConfig
            (new ActionForward("external", "http://jakarta.apache.org/",
View Full Code Here

    // Set up third app for testing URL mapping
    protected void setUpThirdApp() {


        appConfig3 = new ApplicationConfig("/3");
        context.setAttribute(Action.APPLICATION_KEY + "/3", appConfig3);

        // Instantiate the controller configuration for this app
        ControllerConfig controller = new ControllerConfig();
        appConfig3.setControllerConfig(controller);
View Full Code Here

    // Map to the default module -- direct
    public void testSelectApplication1a() {

        request.setPathElements("/myapp", "/noform.do", null, null);
        RequestUtils.selectApplication(request, context);
        ApplicationConfig appConfig = (ApplicationConfig)
            request.getAttribute(Action.APPLICATION_KEY);
        assertNotNull("Selected an application", appConfig);
        assertEquals("Selected correct application",
                     "", appConfig.getPrefix());
        // FIXME - check application resources?

    }
View Full Code Here

    // Map to the second module -- direct
    public void testSelectApplication1b() {

        request.setPathElements("/myapp", "/2/noform.do", null, null);
        RequestUtils.selectApplication(request, context);
        ApplicationConfig appConfig = (ApplicationConfig)
            request.getAttribute(Action.APPLICATION_KEY);
        assertNotNull("Selected an application", appConfig);
        assertEquals("Selected correct application",
                     "/2", appConfig.getPrefix());
        // FIXME - check application resources?

    }
View Full Code Here

        request.setPathElements("/myapp", "/2/noform.do", null, null);
        request.setAttribute(RequestProcessor.INCLUDE_SERVLET_PATH,
                             "/noform.do");
        RequestUtils.selectApplication(request, context);
        ApplicationConfig appConfig = (ApplicationConfig)
            request.getAttribute(Action.APPLICATION_KEY);
        assertNotNull("Selected an application", appConfig);
        assertEquals("Selected correct application",
                     "", appConfig.getPrefix());
        // FIXME - check application resources?

    }
View Full Code Here

        request.setPathElements("/myapp", "/noform.do", null, null);
        request.setAttribute(RequestProcessor.INCLUDE_SERVLET_PATH,
                             "/2/noform.do");
        RequestUtils.selectApplication(request, context);
        ApplicationConfig appConfig = (ApplicationConfig)
            request.getAttribute(Action.APPLICATION_KEY);
        assertNotNull("Selected an application", appConfig);
        assertEquals("Selected correct application",
                     "/2", appConfig.getPrefix());
        // FIXME - check application resources?

    }
View Full Code Here

        /* FIXME for Struts 1.2
           Since Struts 1.1 only has one implementation for
           ModuleConfig casting is safe here. Used only for
           transition purposes !
        */
        return new ApplicationConfig((ModuleConfigImpl)getModuleConfig(request));
    }
View Full Code Here

TOP

Related Classes of org.apache.struts.config.ApplicationConfig

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.