Examples of StrutsXmlConfigurationProvider


Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

    protected XmlConfigurationProvider createXmlConfigurationProvider(String filename, boolean errorIfMissing) {
        return new XmlConfigurationProvider(filename, errorIfMissing);
    }

    protected XmlConfigurationProvider createStrutsXmlConfigurationProvider(String filename, boolean errorIfMissing, ServletContext ctx) {
        return new StrutsXmlConfigurationProvider(filename, errorIfMissing, ctx);
    }
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

    private static void initXWork() {
        String configFilePath = configDir + "/struts.xml";
        File configFile = new File(configFilePath);
        try {
            ConfigurationProvider configProvider = new StrutsXmlConfigurationProvider(configFile.getCanonicalPath(), true, null);
            cm = new ConfigurationManager();
            cm.addContainerProvider(new DefaultPropertiesProvider());
            cm.addContainerProvider(new StrutsXmlConfigurationProvider("struts-default.xml", false, null));
            cm.addContainerProvider(configProvider);
            cm.addContainerProvider(new PropertiesConfigurationProvider());
            cm.addContainerProvider(new DefaultBeanSelectionProvider());
            isXWorkStarted = true;
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

     * Set up instance variables required by this test case.
     * @throws Exception
     */
    public void setUp() throws Exception {
        super.setUp();
        loadConfigurationProviders(new StrutsXmlConfigurationProvider(PACKAGE_NAME + "/test-struts-factory.xml", true, null));
        factory = new Struts1Factory(configuration);
       
    }
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

    protected XmlConfigurationProvider createXmlConfigurationProvider(String filename, boolean errorIfMissing) {
        return new XmlConfigurationProvider(filename, errorIfMissing);
    }

    protected XmlConfigurationProvider createStrutsXmlConfigurationProvider(String filename, boolean errorIfMissing, ServletContext ctx) {
        return new StrutsXmlConfigurationProvider(filename, errorIfMissing, ctx);
    }
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

    /**
     * Set up instance variables required by this test case.
     */
    public void setUp() {
        ConfigurationManager manager = new ConfigurationManager();
        StrutsXmlConfigurationProvider provider = new StrutsXmlConfigurationProvider(PACKAGE_NAME + "/test-struts-factory.xml", true, null);
        manager.addConfigurationProvider(provider);
        config = manager.getConfiguration();
        factory = new Struts1Factory(config);
    }
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

    private static void initXWork() {
        String configFilePath = configDir + "/struts.xml";
        File configFile = new File(configFilePath);
        try {
            ConfigurationProvider configProvider = new StrutsXmlConfigurationProvider(configFile.getCanonicalPath(), true, null);
            cm = new ConfigurationManager();
            cm.addConfigurationProvider(new DefaultPropertiesProvider());
            cm.addConfigurationProvider(new StrutsXmlConfigurationProvider("struts-default.xml", false, null));
            cm.addConfigurationProvider(configProvider);
            cm.addConfigurationProvider(new LegacyPropertiesConfigurationProvider());
            cm.addConfigurationProvider(new BeanSelectionProvider());
            isXWorkStarted = true;
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

        LocalizedTextUtil.clearDefaultResourceBundles();
        Dispatcher du = new Dispatcher(new MockServletContext());
        Dispatcher.setInstance(du);
        configurationManager = new ConfigurationManager();
        configurationManager.addConfigurationProvider(
                new StrutsXmlConfigurationProvider("struts-default.xml", false));
        configurationManager.addConfigurationProvider(
                new StrutsXmlConfigurationProvider("struts-plugin.xml", false));
        configurationManager.addConfigurationProvider(
                new StrutsXmlConfigurationProvider("struts.xml", false));
        du.setConfigurationManager(configurationManager);
       
    }
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

    protected void setUp() throws Exception {
        super.setUp();
        Dispatcher du = new Dispatcher(new MockServletContext());
        Dispatcher.setInstance(du);
        ConfigurationManager cm = new ConfigurationManager();
        cm.addConfigurationProvider(new StrutsXmlConfigurationProvider("struts.xml", false));
        du.setConfigurationManager(cm);
        du.getConfigurationManager().getConfiguration().
            addPackageConfig("foo", new PackageConfig("foo", "/namespace", false, null));
       
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

          String[] files = configFiles.split("\\s*[,]\\s*");
          for (String file : files) {
              if ("xwork.xml".equals(file)) {
                  configurationManager.addConfigurationProvider(new XmlConfigurationProvider(file, false));
              } else {
                  configurationManager.addConfigurationProvider(new StrutsXmlConfigurationProvider(file, false));
              }
          }
        }

        synchronized(Dispatcher.class) {
View Full Code Here

Examples of org.apache.struts2.config.StrutsXmlConfigurationProvider

        for (String file : files) {
            if (file.endsWith(".xml")) {
                if ("xwork.xml".equals(file)) {
                    configurationManager.addConfigurationProvider(new XmlConfigurationProvider(file, false));
                } else {
                    configurationManager.addConfigurationProvider(new StrutsXmlConfigurationProvider(file, false, servletContext));
                }
            } else {
                throw new IllegalArgumentException("Invalid configuration file name");
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.