Package com.opensymphony.xwork2.config.impl

Examples of com.opensymphony.xwork2.config.impl.DefaultConfiguration


        MockHttpServletResponse res = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        final InnerDispatcher _dispatcher = new InnerDispatcher(servletContext);
        Dispatcher.setInstance(null);

        DefaultConfiguration conf = new DefaultConfiguration() {
          @Override
          public Container getContainer() {
            return new ContainerBuilder().create(false);
          }
        };
View Full Code Here


        ObjectFactory originalObjectFactory = ObjectFactory.getObjectFactory();

        final Container cont = container;
        try {
            // used to determined if the form action needs js validation
            configurationManager.setConfiguration(new DefaultConfiguration() {
                private DefaultConfiguration self = this;
                public Container getContainer() {
                    return new Container() {
                        public <T> T inject(Class<T> implementation) {return null;}
                        public void removeScopeStrategy() {}
View Full Code Here

    Configuration config;

    public void setUp() throws Exception {
        provider = new ClasspathPackageProvider();
        provider.setActionPackages("org.apache.struts2.config");
        config = new DefaultConfiguration();
        PackageConfig strutsDefault = new PackageConfig.Builder("struts-default")
                .addResultTypeConfig(new ResultTypeConfig.Builder("dispatcher", ServletDispatcherResult.class.getName())
                        .defaultResultParam("location")
                        .build())
                .defaultResultType("dispatcher")
View Full Code Here

   
    public void testDisableScanning() {
        provider = new ClasspathPackageProvider();
        provider.setActionPackages("org.apache.struts2.config");
        provider.setDisableActionScanning("true");
        config = new DefaultConfiguration();
        provider.init(config);
        provider.loadPackages();
       
        assertEquals(0, config.getPackageConfigs().size());
    }
View Full Code Here

        super.setUp();
        req = new MockHttpServletRequest();
        req.setupGetParameterMap(new HashMap());
        req.setupGetContextPath("/my/namespace");

        config = new DefaultConfiguration();
        PackageConfig pkg = new PackageConfig.Builder("myns")
            .namespace("/my/namespace").build();
        PackageConfig pkg2 = new PackageConfig.Builder("my").namespace("/my").build();
        config.addPackageConfig("mvns", pkg);
        config.addPackageConfig("my", pkg2);
View Full Code Here

        MockHttpServletRequest req = new MockHttpServletRequest(servletContext);
        MockHttpServletResponse res = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        final NoOpDispatcher _dispatcher = new NoOpDispatcher(servletContext);
        ConfigurationManager confManager = new ConfigurationManager();
        confManager.setConfiguration(new DefaultConfiguration());
        _dispatcher.setConfigurationManager(confManager);
        Dispatcher.setInstance(_dispatcher);

       
View Full Code Here

        req.setContextPath("/myapp");
        req.setMethod("GET");

        mapper = new RestActionMapper();

        config = new DefaultConfiguration();
        PackageConfig pkg = new PackageConfig.Builder("myns").namespace("/animals").build();
        PackageConfig pkg2 = new PackageConfig.Builder("my").namespace("/my").build();
        config.addPackageConfig("mvns", pkg);
        config.addPackageConfig("my", pkg2);
        configManager = new ConfigurationManager() {
View Full Code Here

        MockHttpServletRequest req = new MockHttpServletRequest(servletContext);
        MockHttpServletResponse res = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        final NoOpDispatcher _dispatcher = new NoOpDispatcher(servletContext);
        ConfigurationManager confManager = new ConfigurationManager();
        confManager.setConfiguration(new DefaultConfiguration());
        _dispatcher.setConfigurationManager(confManager);
        Dispatcher.setInstance(_dispatcher);

       
View Full Code Here

        MockHttpServletResponse res = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        final InnerDispatcher _dispatcher = new InnerDispatcher(servletContext);
        Dispatcher.setInstance(null);

        DefaultConfiguration conf = new DefaultConfiguration() {
          @Override
          public Container getContainer() {
            return new ContainerBuilder().create(false);
          }
        };
View Full Code Here

        MockHttpServletRequest req = new MockHttpServletRequest(servletContext);
        MockHttpServletResponse res = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        final NoOpDispatcher _dispatcher = new NoOpDispatcher(servletContext);
        ConfigurationManager confManager = new ConfigurationManager();
        confManager.setConfiguration(new DefaultConfiguration());
        _dispatcher.setConfigurationManager(confManager);
        Dispatcher.setInstance(_dispatcher);

       
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.config.impl.DefaultConfiguration

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.