struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4875) Java configuration
Date Fri, 16 Mar 2018 13:24:02 GMT

    [ https://issues.apache.org/jira/browse/WW-4875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401866#comment-16401866 ] 

ASF GitHub Bot commented on WW-4875:
------------------------------------

lukaszlenart closed pull request #177: WW-4875 Add ability to use Java based configuration
URL: https://github.com/apache/struts/pull/177
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java b/core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java
index 550e19e01..138bd48ed 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java
@@ -19,6 +19,8 @@
 package com.opensymphony.xwork2.util.location;
 
 import com.opensymphony.xwork2.util.ClassLoaderUtil;
+
+import org.apache.struts2.config.StrutsJavaConfiguration;
 import org.w3c.dom.Element;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXParseException;
@@ -305,6 +307,10 @@ public static Location getLocation(Object obj, String description) {
         		}
         }
 
+        if (obj instanceof StrutsJavaConfiguration) {
+            return new LocationImpl(description, obj.toString());
+        }
+
         return Location.UNKNOWN;
     }
 }
diff --git a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java
new file mode 100644
index 000000000..da84d5e46
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.config;
+
+import java.util.List;
+
+import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.ConstantConfig;
+
+public interface StrutsJavaConfiguration {
+    List<BeanConfig> beans();
+
+    List<ConstantConfig> constants();
+
+    List<String> unknownHandlerStack();
+}
diff --git a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java
new file mode 100644
index 000000000..5aaaf57e2
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.config;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.ConstantConfig;
+
+import com.opensymphony.xwork2.config.Configuration;
+import com.opensymphony.xwork2.config.ConfigurationException;
+import com.opensymphony.xwork2.config.ConfigurationProvider;
+import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig;
+import com.opensymphony.xwork2.config.impl.LocatableFactory;
+import com.opensymphony.xwork2.config.providers.ValueSubstitutor;
+import com.opensymphony.xwork2.inject.ContainerBuilder;
+import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.location.LocatableProperties;
+import com.opensymphony.xwork2.util.location.Location;
+import com.opensymphony.xwork2.util.location.LocationUtils;
+
+public class StrutsJavaConfigurationProvider implements ConfigurationProvider {
+    private static final Logger LOG = LogManager.getLogger(StrutsJavaConfigurationProvider.class);
+
+    private final StrutsJavaConfiguration javaConfig;
+    private Configuration configuration;
+    private boolean throwExceptionOnDuplicateBeans = true;
+    private ValueSubstitutor valueSubstitutor;
+
+    public StrutsJavaConfigurationProvider(StrutsJavaConfiguration javaConfig) {
+        this.javaConfig = javaConfig;
+    }
+
+    public void setThrowExceptionOnDuplicateBeans(boolean val) {
+        this.throwExceptionOnDuplicateBeans = val;
+    }
+
+    @Inject(required = false)
+    public void setValueSubstitutor(ValueSubstitutor valueSubstitutor) {
+        this.valueSubstitutor = valueSubstitutor;
+    }
+
+    @Override
+    public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
+        Map<String, Object> loadedBeans = new HashMap<>();
+
+        // bean
+        List<BeanConfig> beanConfigs = javaConfig.beans();
+        if (beanConfigs != null) {
+            for (BeanConfig bc : beanConfigs) {
+                if (bc != null) {
+                    registerBean(loadedBeans, builder, bc);
+                }
+            }
+        }
+
+        // constant
+        List<ConstantConfig> constantConfigList = javaConfig.constants();
+        if (constantConfigList != null) {
+            for (ConstantConfig constantConf : constantConfigList) {
+                if (constantConf != null) {
+                    Map<String, String> constantMap = constantConf.getAllAsStringsMap();
+                    for (Entry<String, String> entr : constantMap.entrySet()) {
+                        if (entr.getKey() != null && entr.getValue() != null) {
+                            registerConstant(props, entr.getKey(), entr.getValue());
+                        }
+                    }
+                }
+            }
+        }
+
+        // unknown-handler-stack
+        List<String> unknownHandlers = javaConfig.unknownHandlerStack();
+        if (unknownHandlers != null) {
+            List<UnknownHandlerConfig> unknownHandlerStack = new ArrayList<>();
+            for (String unknownHandler : unknownHandlers) {
+                Location location = LocationUtils.getLocation(unknownHandler);
+                unknownHandlerStack.add(new UnknownHandlerConfig(unknownHandler, location));
+            }
+
+            if (!unknownHandlerStack.isEmpty()) {
+                configuration.setUnknownHandlerStack(unknownHandlerStack);
+            }
+        }
+    }
+
+    private void registerConstant(LocatableProperties props, String key, String value) {
+        if (valueSubstitutor != null) {
+            LOG.debug("Substituting value [{}] using [{}]", value, valueSubstitutor.getClass().getName());
+            value = valueSubstitutor.substitute(value);
+        }
+
+        props.setProperty(key, value, javaConfig);
+    }
+
+    private void registerBean(Map<String, Object> loadedBeans, ContainerBuilder containerBuilder, BeanConfig beanConf) {
+        try {
+            if (beanConf.isOnlyStatic()) {
+                // Force loading of class to detect no class def found
+                // exceptions
+                beanConf.getClazz().getDeclaredClasses();
+                containerBuilder.injectStatics(beanConf.getClazz());
+            } else {
+                if (containerBuilder.contains(beanConf.getType(), beanConf.getName())) {
+                    Location loc = LocationUtils
+                            .getLocation(loadedBeans.get(beanConf.getType().getName() + beanConf.getName()));
+                    if (throwExceptionOnDuplicateBeans) {
+                        throw new ConfigurationException("Bean type " + beanConf.getType() + " with the name "
+                                + beanConf.getName() + " has already been loaded by " + loc, javaConfig);
+                    }
+                }
+
+                // Force loading of class to detect no class def found
+                // exceptions
+                beanConf.getClazz().getDeclaredConstructors();
+
+                LOG.debug("Loaded type: {} name: {} clazz: {}", beanConf.getType(), beanConf.getName(),
+                        beanConf.getClazz());
+                containerBuilder.factory(
+                        beanConf.getType(), beanConf.getName(), new LocatableFactory(beanConf.getName(),
+                                beanConf.getType(), beanConf.getClazz(), beanConf.getScope(), javaConfig),
+                        beanConf.getScope());
+            }
+            loadedBeans.put(beanConf.getType().getName() + beanConf.getName(), javaConfig);
+        } catch (Throwable ex) {
+            if (!beanConf.isOptional()) {
+                throw new ConfigurationException(
+                        "Unable to load bean: type:" + beanConf.getType() + " class:" + beanConf.getClazz(), ex);
+            } else {
+                LOG.debug("Unable to load optional class: {}", beanConf.getClazz());
+            }
+        }
+    }
+
+    @Override
+    public void init(Configuration configuration) throws ConfigurationException {
+        this.configuration = configuration;
+    }
+
+    @Override
+    public boolean needsReload() {
+        return false;
+    }
+
+    @Override
+    public void loadPackages() throws ConfigurationException {
+    }
+
+    @Override
+    public void destroy() {
+    }
+}
diff --git a/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java b/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java
new file mode 100644
index 000000000..d01db0f0d
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.config.entities;
+
+import com.opensymphony.xwork2.inject.Container;
+import com.opensymphony.xwork2.inject.Scope;
+
+public class BeanConfig {
+    private final Class<?> clazz;
+    private final String name;
+    private final Class<?> type;
+    private final Scope scope;
+    private final boolean onlyStatic;
+    private final boolean optional;
+
+    public BeanConfig(Class<?> clazz) {
+        this(clazz, Container.DEFAULT_NAME);
+    }
+
+    public BeanConfig(Class<?> clazz, String name) {
+        this(clazz, name, clazz);
+    }
+
+    public BeanConfig(Class<?> clazz, String name, Class<?> type) {
+        this(clazz, name, type, Scope.SINGLETON, false, false);
+    }
+
+    public BeanConfig(Class<?> clazz, String name, Class<?> type, Scope scope, boolean onlyStatic, boolean optional) {
+        this.clazz = clazz;
+        this.name = name;
+        this.type = type;
+        this.scope = scope;
+        this.onlyStatic = onlyStatic;
+        this.optional = optional;
+    }
+
+    public Class<?> getClazz() {
+        return clazz;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Class<?> getType() {
+        return type;
+    }
+
+    public Scope getScope() {
+        return scope;
+    }
+
+    public boolean isOnlyStatic() {
+        return onlyStatic;
+    }
+
+    public boolean isOptional() {
+        return optional;
+    }
+}
diff --git a/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java b/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java
new file mode 100644
index 000000000..9f191e4b5
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java
@@ -0,0 +1,1308 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.config.entities;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.struts2.StrutsConstants;
+
+public class ConstantConfig {
+    private Boolean devMode;
+    private Boolean i18nReload;
+    private String i18nEncoding;
+    private Boolean configurationXmlReload;
+    private List<String> actionExtension;
+    private List<Pattern> actionExcludePattern;
+    private Boolean tagAltSyntax;
+    private Integer urlHttpPort;
+    private Integer urlHttpsPort;
+    private String urlIncludeParams;
+    private BeanConfig urlRenderer;
+    private BeanConfig objectFactory;
+    private BeanConfig objectFactoryActionFactory;
+    private BeanConfig objectFactoryResultFactory;
+    private BeanConfig objectFactoryConverterFactory;
+    private BeanConfig objectFactoryInterceptorFactory;
+    private BeanConfig objectFactoryValidatorFactory;
+    private BeanConfig objectFactoryUnknownHandlerFactory;
+    private BeanConfig objectTypeDeterminer;
+    private Locale locale;
+    private Boolean dispatcherParametersWorkaround;
+    private BeanConfig freemarkerManagerClassname;
+    private String freemarkerTemplatesCacheUpdateDelay;
+    private Boolean freemarkerBeanwrapperCache;
+    private Integer freemarkerMruMaxStrongSize;
+    private BeanConfig velocityManagerClassname;
+    private String velocityConfigfile;
+    private String velocityToolboxlocation;
+    private List<String> velocityContexts;
+    private String uiTemplateDir;
+    private String uiTheme;
+    private String uiThemeExpansionToken;
+    private Long multipartMaxSize;
+    private String multipartSaveDir;
+    private Integer multipartBufferSize;
+    private BeanConfig multipartParser;
+    private Boolean multipartEnabled;
+    private Pattern multipartValidationRegex;
+    private String objectFactorySpringAutoWire;
+    private Boolean objectFactorySpringAutoWireAlwaysRespect;
+    private Boolean objectFactorySpringUseClassCache;
+    private Boolean objectFactorySpringEnableAopSupport;
+    private Boolean xsltNocache;
+    private List<String> customProperties;
+    private List<String> customI18nResources;
+    private BeanConfig mapperClass;
+    private List<String> mapperPrefixMapping;
+    private Boolean serveStatic;
+    private Boolean serveStaticBrowserCache;
+    private Boolean enableDynamicMethodInvocation;
+    private Boolean enableSlashesInActionNames;
+    private List<String> mapperComposite;
+    private BeanConfig actionProxyFactory;
+    private Boolean freemarkerWrapperAltMap;
+    private BeanConfig xworkConverter;
+    private Boolean mapperAlwaysSelectFullNamespace;
+    private BeanConfig xworkTextProvider;
+    private BeanConfig localeProvider;
+    private BeanConfig localeProviderFactory;
+    private String mapperIdParameterName;
+    private Boolean ognlAllowStaticMethodAccess;
+    private BeanConfig actionValidatorManager;
+    private BeanConfig valueStackFactory;
+    private BeanConfig reflectionProvider;
+    private BeanConfig reflectionContextFactory;
+    private BeanConfig patternMatcher;
+    private BeanConfig staticContentLoader;
+    private BeanConfig unknownHandlerManager;
+    private Boolean elThrowExceptionOnFailure;
+    private Boolean ognlLogMissingProperties;
+    private Boolean ognlEnableExpressionCache;
+    private Boolean ognlEnableOGNLEvalExpression;
+    private Boolean disableRequestAttributeValueStackLookup;
+    private BeanConfig viewUrlHelper;
+    private BeanConfig converterCollection;
+    private BeanConfig converterArray;
+    private BeanConfig converterDate;
+    private BeanConfig converterNumber;
+    private BeanConfig converterString;
+    private Boolean handleException;
+    private BeanConfig converterPropertiesProcessor;
+    private BeanConfig converterFileProcessor;
+    private BeanConfig converterAnnotationProcessor;
+    private BeanConfig converterCreator;
+    private BeanConfig ConverterHolder;
+    private BeanConfig expressionParser;
+    private Pattern allowedActionNames;
+    private String defaultActionName;
+    private Pattern allowedMethodNames;
+    private String defaultMethodName;
+    private Boolean mapperActionPrefixEnabled;
+    private Boolean mapperActionPrefixCrossNamespaces;
+    private String uiTemplateSuffix;
+    private BeanConfig dispatcherErrorHandler;
+    private Set<Class<?>> excludedClasses;
+    private List<Pattern> excludedPackageNamePatterns;
+    private Set<String> excludedPackageNames;
+    private BeanConfig excludedPatternsChecker;
+    private BeanConfig acceptedPatternsChecker;
+    private Set<Pattern> overrideExcludedPatterns;
+    private Set<Pattern> overrideAcceptedPatterns;
+    private Set<Pattern> additionalExcludedPatterns;
+    private Set<Pattern> additionalAcceptedPatterns;
+    private BeanConfig contentTypeMatcher;
+    private String strictMethodInvocationMethodRegex;
+    private BeanConfig textProviderFactory;
+    private BeanConfig localizedTextProvider;
+    private Boolean disallowProxyMemberAccess;
+
+    protected String beanConfToString(BeanConfig beanConf) {
+        return beanConf == null ? null : beanConf.getName();
+    }
+
+    private String classesToString(Set<Class<?>> classes) {
+        List<String> list = null;
+        if (classes != null && !classes.isEmpty()) {
+            list = new ArrayList<String>();
+            for (Class<?> c : classes) {
+                list.add(c.getName());
+            }
+        }
+        return StringUtils.join(list, ',');
+    }
+
+    public Map<String, String> getAllAsStringsMap() {
+        Map<String, String> map = new HashMap<>();
+
+        map.put(StrutsConstants.STRUTS_DEVMODE, Objects.toString(devMode, null));
+        map.put(StrutsConstants.STRUTS_I18N_RELOAD, Objects.toString(i18nReload, null));
+        map.put(StrutsConstants.STRUTS_I18N_ENCODING, i18nEncoding);
+        map.put(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, Objects.toString(configurationXmlReload, null));
+        map.put(StrutsConstants.STRUTS_ACTION_EXTENSION, StringUtils.join(actionExtension, ','));
+        map.put(StrutsConstants.STRUTS_ACTION_EXCLUDE_PATTERN, StringUtils.join(actionExcludePattern, ','));
+        map.put(StrutsConstants.STRUTS_TAG_ALTSYNTAX, Objects.toString(tagAltSyntax, null));
+        map.put(StrutsConstants.STRUTS_URL_HTTP_PORT, Objects.toString(urlHttpPort, null));
+        map.put(StrutsConstants.STRUTS_URL_HTTPS_PORT, Objects.toString(urlHttpsPort, null));
+        map.put(StrutsConstants.STRUTS_URL_INCLUDEPARAMS, urlIncludeParams);
+        map.put(StrutsConstants.STRUTS_URL_RENDERER, beanConfToString(urlRenderer));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY, beanConfToString(objectFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_ACTIONFACTORY, beanConfToString(objectFactoryActionFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_RESULTFACTORY, beanConfToString(objectFactoryResultFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_CONVERTERFACTORY, beanConfToString(objectFactoryConverterFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_INTERCEPTORFACTORY, beanConfToString(objectFactoryInterceptorFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_VALIDATORFACTORY, beanConfToString(objectFactoryValidatorFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_UNKNOWNHANDLERFACTORY, beanConfToString(objectFactoryUnknownHandlerFactory));
+        map.put(StrutsConstants.STRUTS_OBJECTTYPEDETERMINER, beanConfToString(objectTypeDeterminer));
+        map.put(StrutsConstants.STRUTS_LOCALE, locale == null ? null : locale.getLanguage());
+        map.put(StrutsConstants.STRUTS_DISPATCHER_PARAMETERSWORKAROUND, Objects.toString(dispatcherParametersWorkaround, null));
+        map.put(StrutsConstants.STRUTS_FREEMARKER_MANAGER_CLASSNAME, beanConfToString(freemarkerManagerClassname));
+        map.put(StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY, freemarkerTemplatesCacheUpdateDelay);
+        map.put(StrutsConstants.STRUTS_FREEMARKER_BEANWRAPPER_CACHE, Objects.toString(freemarkerBeanwrapperCache, null));
+        map.put(StrutsConstants.STRUTS_FREEMARKER_MRU_MAX_STRONG_SIZE, Objects.toString(freemarkerMruMaxStrongSize, null));
+        map.put(StrutsConstants.STRUTS_VELOCITY_MANAGER_CLASSNAME, beanConfToString(velocityManagerClassname));
+        map.put(StrutsConstants.STRUTS_VELOCITY_CONFIGFILE, velocityConfigfile);
+        map.put(StrutsConstants.STRUTS_VELOCITY_TOOLBOXLOCATION, velocityToolboxlocation);
+        map.put(StrutsConstants.STRUTS_VELOCITY_CONTEXTS, StringUtils.join(velocityContexts, ','));
+        map.put(StrutsConstants.STRUTS_UI_TEMPLATEDIR, uiTemplateDir);
+        map.put(StrutsConstants.STRUTS_UI_THEME, uiTheme);
+        map.put(StrutsConstants.STRUTS_UI_THEME_EXPANSION_TOKEN, uiThemeExpansionToken);
+        map.put(StrutsConstants.STRUTS_MULTIPART_MAXSIZE, Objects.toString(multipartMaxSize, null));
+        map.put(StrutsConstants.STRUTS_MULTIPART_SAVEDIR, multipartSaveDir);
+        map.put(StrutsConstants.STRUTS_MULTIPART_BUFFERSIZE, Objects.toString(multipartBufferSize, null));
+        map.put(StrutsConstants.STRUTS_MULTIPART_PARSER, beanConfToString(multipartParser));
+        map.put(StrutsConstants.STRUTS_MULTIPART_ENABLED, Objects.toString(multipartEnabled, null));
+        map.put(StrutsConstants.STRUTS_MULTIPART_VALIDATION_REGEX, Objects.toString(multipartValidationRegex, null));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE, objectFactorySpringAutoWire);
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE_ALWAYS_RESPECT, Objects.toString(objectFactorySpringAutoWireAlwaysRespect, null));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHE, Objects.toString(objectFactorySpringUseClassCache, null));
+        map.put(StrutsConstants.STRUTS_OBJECTFACTORY_SPRING_ENABLE_AOP_SUPPORT, Objects.toString(objectFactorySpringEnableAopSupport, null));
+        map.put(StrutsConstants.STRUTS_XSLT_NOCACHE, Objects.toString(xsltNocache, null));
+        map.put(StrutsConstants.STRUTS_CUSTOM_PROPERTIES, StringUtils.join(customProperties, ','));
+        map.put(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES, StringUtils.join(customI18nResources, ','));
+        map.put(StrutsConstants.STRUTS_MAPPER_CLASS, beanConfToString(mapperClass));
+        map.put(StrutsConstants.PREFIX_BASED_MAPPER_CONFIGURATION, StringUtils.join(mapperPrefixMapping, ','));
+        map.put(StrutsConstants.STRUTS_SERVE_STATIC_CONTENT, Objects.toString(serveStatic, null));
+        map.put(StrutsConstants.STRUTS_SERVE_STATIC_BROWSER_CACHE, Objects.toString(serveStaticBrowserCache, null));
+        map.put(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION, Objects.toString(enableDynamicMethodInvocation, null));
+        map.put(StrutsConstants.STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES, Objects.toString(enableSlashesInActionNames, null));
+        map.put(StrutsConstants.STRUTS_MAPPER_COMPOSITE, StringUtils.join(mapperComposite, ','));
+        map.put(StrutsConstants.STRUTS_ACTIONPROXYFACTORY, beanConfToString(actionProxyFactory));
+        map.put(StrutsConstants.STRUTS_FREEMARKER_WRAPPER_ALT_MAP, Objects.toString(freemarkerWrapperAltMap, null));
+        map.put(StrutsConstants.STRUTS_XWORKCONVERTER, beanConfToString(xworkConverter));
+        map.put(StrutsConstants.STRUTS_ALWAYS_SELECT_FULL_NAMESPACE, Objects.toString(mapperAlwaysSelectFullNamespace, null));
+        map.put(StrutsConstants.STRUTS_XWORKTEXTPROVIDER, beanConfToString(xworkTextProvider));
+        map.put(StrutsConstants.STRUTS_LOCALE_PROVIDER, beanConfToString(localeProvider));
+        map.put(StrutsConstants.STRUTS_LOCALE_PROVIDER_FACTORY, beanConfToString(localeProviderFactory));
+        map.put(StrutsConstants.STRUTS_ID_PARAMETER_NAME, mapperIdParameterName);
+        map.put(StrutsConstants.STRUTS_ALLOW_STATIC_METHOD_ACCESS, Objects.toString(ognlAllowStaticMethodAccess, null));
+        map.put(StrutsConstants.STRUTS_ACTIONVALIDATORMANAGER, beanConfToString(actionValidatorManager));
+        map.put(StrutsConstants.STRUTS_VALUESTACKFACTORY, beanConfToString(valueStackFactory));
+        map.put(StrutsConstants.STRUTS_REFLECTIONPROVIDER, beanConfToString(reflectionProvider));
+        map.put(StrutsConstants.STRUTS_REFLECTIONCONTEXTFACTORY, beanConfToString(reflectionContextFactory));
+        map.put(StrutsConstants.STRUTS_PATTERNMATCHER, beanConfToString(patternMatcher));
+        map.put(StrutsConstants.STRUTS_STATIC_CONTENT_LOADER, beanConfToString(staticContentLoader));
+        map.put(StrutsConstants.STRUTS_UNKNOWN_HANDLER_MANAGER, beanConfToString(unknownHandlerManager));
+        map.put(StrutsConstants.STRUTS_EL_THROW_EXCEPTION, Objects.toString(elThrowExceptionOnFailure, null));
+        map.put(StrutsConstants.STRUTS_LOG_MISSING_PROPERTIES, Objects.toString(ognlLogMissingProperties, null));
+        map.put(StrutsConstants.STRUTS_ENABLE_OGNL_EXPRESSION_CACHE, Objects.toString(ognlEnableExpressionCache, null));
+        map.put(StrutsConstants.STRUTS_ENABLE_OGNL_EVAL_EXPRESSION, Objects.toString(ognlEnableOGNLEvalExpression, null));
+        map.put(StrutsConstants.STRUTS_DISABLE_REQUEST_ATTRIBUTE_VALUE_STACK_LOOKUP, Objects.toString(disableRequestAttributeValueStackLookup, null));
+        map.put(StrutsConstants.STRUTS_URL_HELPER, beanConfToString(viewUrlHelper));
+        map.put(StrutsConstants.STRUTS_CONVERTER_COLLECTION, beanConfToString(converterCollection));
+        map.put(StrutsConstants.STRUTS_CONVERTER_ARRAY, beanConfToString(converterArray));
+        map.put(StrutsConstants.STRUTS_CONVERTER_DATE, beanConfToString(converterDate));
+        map.put(StrutsConstants.STRUTS_CONVERTER_NUMBER, beanConfToString(converterNumber));
+        map.put(StrutsConstants.STRUTS_CONVERTER_STRING, beanConfToString(converterString));
+        map.put(StrutsConstants.STRUTS_HANDLE_EXCEPTION, Objects.toString(handleException, null));
+        map.put(StrutsConstants.STRUTS_CONVERTER_PROPERTIES_PROCESSOR, beanConfToString(converterPropertiesProcessor));
+        map.put(StrutsConstants.STRUTS_CONVERTER_FILE_PROCESSOR, beanConfToString(converterFileProcessor));
+        map.put(StrutsConstants.STRUTS_CONVERTER_ANNOTATION_PROCESSOR, beanConfToString(converterAnnotationProcessor));
+        map.put(StrutsConstants.STRUTS_CONVERTER_CREATOR, beanConfToString(converterCreator));
+        map.put(StrutsConstants.STRUTS_CONVERTER_HOLDER, beanConfToString(ConverterHolder));
+        map.put(StrutsConstants.STRUTS_EXPRESSION_PARSER, beanConfToString(expressionParser));
+        map.put(StrutsConstants.STRUTS_ALLOWED_ACTION_NAMES, Objects.toString(allowedActionNames, null));
+        map.put(StrutsConstants.STRUTS_DEFAULT_ACTION_NAME, defaultActionName);
+        map.put(StrutsConstants.STRUTS_ALLOWED_METHOD_NAMES, Objects.toString(allowedMethodNames, null));
+        map.put(StrutsConstants.STRUTS_DEFAULT_METHOD_NAME, defaultMethodName);
+        map.put(StrutsConstants.STRUTS_MAPPER_ACTION_PREFIX_ENABLED, Objects.toString(mapperActionPrefixEnabled, null));
+        map.put(StrutsConstants.STRUTS_MAPPER_ACTION_PREFIX_CROSSNAMESPACES, Objects.toString(mapperActionPrefixCrossNamespaces, null));
+        map.put(StrutsConstants.DEFAULT_TEMPLATE_TYPE_CONFIG_KEY, uiTemplateSuffix);
+        map.put(StrutsConstants.STRUTS_DISPATCHER_ERROR_HANDLER, beanConfToString(dispatcherErrorHandler));
+        map.put(StrutsConstants.STRUTS_EXCLUDED_CLASSES, classesToString(excludedClasses));
+        map.put(StrutsConstants.STRUTS_EXCLUDED_PACKAGE_NAME_PATTERNS, StringUtils.join(excludedPackageNamePatterns, ','));
+        map.put(StrutsConstants.STRUTS_EXCLUDED_PACKAGE_NAMES, StringUtils.join(excludedPackageNames, ','));
+        map.put(StrutsConstants.STRUTS_EXCLUDED_PATTERNS_CHECKER, beanConfToString(excludedPatternsChecker));
+        map.put(StrutsConstants.STRUTS_ACCEPTED_PATTERNS_CHECKER, beanConfToString(acceptedPatternsChecker));
+        map.put(StrutsConstants.STRUTS_OVERRIDE_EXCLUDED_PATTERNS, StringUtils.join(overrideExcludedPatterns, ','));
+        map.put(StrutsConstants.STRUTS_OVERRIDE_ACCEPTED_PATTERNS, StringUtils.join(overrideAcceptedPatterns, ','));
+        map.put(StrutsConstants.STRUTS_ADDITIONAL_EXCLUDED_PATTERNS, StringUtils.join(additionalExcludedPatterns, ','));
+        map.put(StrutsConstants.STRUTS_ADDITIONAL_ACCEPTED_PATTERNS, StringUtils.join(additionalAcceptedPatterns, ','));
+        map.put(StrutsConstants.STRUTS_CONTENT_TYPE_MATCHER, beanConfToString(contentTypeMatcher));
+        map.put(StrutsConstants.STRUTS_SMI_METHOD_REGEX, strictMethodInvocationMethodRegex);
+        map.put(StrutsConstants.STRUTS_TEXT_PROVIDER_FACTORY, beanConfToString(textProviderFactory));
+        map.put(StrutsConstants.STRUTS_LOCALIZED_TEXT_PROVIDER, beanConfToString(localizedTextProvider));
+        map.put(StrutsConstants.STRUTS_DISALLOW_PROXY_MEMBER_ACCESS, Objects.toString(disallowProxyMemberAccess, null));
+
+        return map;
+    }
+
+    public Boolean getDevMode() {
+        return devMode;
+    }
+
+    public void setDevMode(Boolean devMode) {
+        this.devMode = devMode;
+    }
+
+    public Boolean getI18nReload() {
+        return i18nReload;
+    }
+
+    public void setI18nReload(Boolean i18nReload) {
+        this.i18nReload = i18nReload;
+    }
+
+    public String getI18nEncoding() {
+        return i18nEncoding;
+    }
+
+    public void setI18nEncoding(String i18nEncoding) {
+        this.i18nEncoding = i18nEncoding;
+    }
+
+    public Boolean getConfigurationXmlReload() {
+        return configurationXmlReload;
+    }
+
+    public void setConfigurationXmlReload(Boolean configurationXmlReload) {
+        this.configurationXmlReload = configurationXmlReload;
+    }
+
+    public List<String> getActionExtension() {
+        return actionExtension;
+    }
+
+    public void setActionExtension(List<String> actionExtension) {
+        this.actionExtension = actionExtension;
+    }
+
+    public List<Pattern> getActionExcludePattern() {
+        return actionExcludePattern;
+    }
+
+    public void setActionExcludePattern(List<Pattern> actionExcludePattern) {
+        this.actionExcludePattern = actionExcludePattern;
+    }
+
+    public Boolean getTagAltSyntax() {
+        return tagAltSyntax;
+    }
+
+    public void setTagAltSyntax(Boolean tagAltSyntax) {
+        this.tagAltSyntax = tagAltSyntax;
+    }
+
+    public Integer getUrlHttpPort() {
+        return urlHttpPort;
+    }
+
+    public void setUrlHttpPort(Integer urlHttpPort) {
+        this.urlHttpPort = urlHttpPort;
+    }
+
+    public Integer getUrlHttpsPort() {
+        return urlHttpsPort;
+    }
+
+    public void setUrlHttpsPort(Integer urlHttpsPort) {
+        this.urlHttpsPort = urlHttpsPort;
+    }
+
+    public String getUrlIncludeParams() {
+        return urlIncludeParams;
+    }
+
+    public void setUrlIncludeParams(String urlIncludeParams) {
+        this.urlIncludeParams = urlIncludeParams;
+    }
+
+    public BeanConfig getUrlRenderer() {
+        return urlRenderer;
+    }
+
+    public void setUrlRenderer(BeanConfig urlRenderer) {
+        this.urlRenderer = urlRenderer;
+    }
+
+    public void setUrlRenderer(Class<?> clazz) {
+        this.urlRenderer = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactory() {
+        return objectFactory;
+    }
+
+    public void setObjectFactory(BeanConfig objectFactory) {
+        this.objectFactory = objectFactory;
+    }
+
+    public void setObjectFactory(Class<?> clazz) {
+        this.objectFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactoryActionFactory() {
+        return objectFactoryActionFactory;
+    }
+
+    public void setObjectFactoryActionFactory(BeanConfig objectFactoryActionFactory) {
+        this.objectFactoryActionFactory = objectFactoryActionFactory;
+    }
+
+    public void setObjectFactoryActionFactory(Class<?> clazz) {
+        this.objectFactoryActionFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactoryResultFactory() {
+        return objectFactoryResultFactory;
+    }
+
+    public void setObjectFactoryResultFactory(BeanConfig objectFactoryResultFactory) {
+        this.objectFactoryResultFactory = objectFactoryResultFactory;
+    }
+
+    public void setObjectFactoryResultFactory(Class<?> clazz) {
+        this.objectFactoryResultFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactoryConverterFactory() {
+        return objectFactoryConverterFactory;
+    }
+
+    public void setObjectFactoryConverterFactory(BeanConfig objectFactoryConverterFactory) {
+        this.objectFactoryConverterFactory = objectFactoryConverterFactory;
+    }
+
+    public void setObjectFactoryConverterFactory(Class<?> clazz) {
+        this.objectFactoryConverterFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactoryInterceptorFactory() {
+        return objectFactoryInterceptorFactory;
+    }
+
+    public void setObjectFactoryInterceptorFactory(BeanConfig objectFactoryInterceptorFactory) {
+        this.objectFactoryInterceptorFactory = objectFactoryInterceptorFactory;
+    }
+
+    public void setObjectFactoryInterceptorFactory(Class<?> clazz) {
+        this.objectFactoryInterceptorFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactoryValidatorFactory() {
+        return objectFactoryValidatorFactory;
+    }
+
+    public void setObjectFactoryValidatorFactory(BeanConfig objectFactoryValidatorFactory) {
+        this.objectFactoryValidatorFactory = objectFactoryValidatorFactory;
+    }
+
+    public void setObjectFactoryValidatorFactory(Class<?> clazz) {
+        this.objectFactoryValidatorFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectFactoryUnknownHandlerFactory() {
+        return objectFactoryUnknownHandlerFactory;
+    }
+
+    public void setObjectFactoryUnknownHandlerFactory(BeanConfig objectFactoryUnknownHandlerFactory) {
+        this.objectFactoryUnknownHandlerFactory = objectFactoryUnknownHandlerFactory;
+    }
+
+    public void setObjectFactoryUnknownHandlerFactory(Class<?> clazz) {
+        this.objectFactoryUnknownHandlerFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getObjectTypeDeterminer() {
+        return objectTypeDeterminer;
+    }
+
+    public void setObjectTypeDeterminer(BeanConfig objectTypeDeterminer) {
+        this.objectTypeDeterminer = objectTypeDeterminer;
+    }
+
+    public void setObjectTypeDeterminer(Class<?> clazz) {
+        this.objectTypeDeterminer = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Locale getLocale() {
+        return locale;
+    }
+
+    public void setLocale(Locale locale) {
+        this.locale = locale;
+    }
+
+    public Boolean getDispatcherParametersWorkaround() {
+        return dispatcherParametersWorkaround;
+    }
+
+    public void setDispatcherParametersWorkaround(Boolean dispatcherParametersWorkaround) {
+        this.dispatcherParametersWorkaround = dispatcherParametersWorkaround;
+    }
+
+    public BeanConfig getFreemarkerManagerClassname() {
+        return freemarkerManagerClassname;
+    }
+
+    public void setFreemarkerManagerClassname(BeanConfig freemarkerManagerClassname) {
+        this.freemarkerManagerClassname = freemarkerManagerClassname;
+    }
+
+    public void setFreemarkerManagerClassname(Class<?> clazz) {
+        this.freemarkerManagerClassname = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public String getFreemarkerTemplatesCacheUpdateDelay() {
+        return freemarkerTemplatesCacheUpdateDelay;
+    }
+
+    public void setFreemarkerTemplatesCacheUpdateDelay(String freemarkerTemplatesCacheUpdateDelay) {
+        this.freemarkerTemplatesCacheUpdateDelay = freemarkerTemplatesCacheUpdateDelay;
+    }
+
+    public Boolean getFreemarkerBeanwrapperCache() {
+        return freemarkerBeanwrapperCache;
+    }
+
+    public void setFreemarkerBeanwrapperCache(Boolean freemarkerBeanwrapperCache) {
+        this.freemarkerBeanwrapperCache = freemarkerBeanwrapperCache;
+    }
+
+    public Integer getFreemarkerMruMaxStrongSize() {
+        return freemarkerMruMaxStrongSize;
+    }
+
+    public void setFreemarkerMruMaxStrongSize(Integer freemarkerMruMaxStrongSize) {
+        this.freemarkerMruMaxStrongSize = freemarkerMruMaxStrongSize;
+    }
+
+    public BeanConfig getVelocityManagerClassname() {
+        return velocityManagerClassname;
+    }
+
+    public void setVelocityManagerClassname(BeanConfig velocityManagerClassname) {
+        this.velocityManagerClassname = velocityManagerClassname;
+    }
+
+    public void setVelocityManagerClassname(Class<?> clazz) {
+        this.velocityManagerClassname = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public String getVelocityConfigfile() {
+        return velocityConfigfile;
+    }
+
+    public void setVelocityConfigfile(String velocityConfigfile) {
+        this.velocityConfigfile = velocityConfigfile;
+    }
+
+    public String getVelocityToolboxlocation() {
+        return velocityToolboxlocation;
+    }
+
+    public void setVelocityToolboxlocation(String velocityToolboxlocation) {
+        this.velocityToolboxlocation = velocityToolboxlocation;
+    }
+
+    public List<String> getVelocityContexts() {
+        return velocityContexts;
+    }
+
+    public void setVelocityContexts(List<String> velocityContexts) {
+        this.velocityContexts = velocityContexts;
+    }
+
+    public String getUiTemplateDir() {
+        return uiTemplateDir;
+    }
+
+    public void setUiTemplateDir(String uiTemplateDir) {
+        this.uiTemplateDir = uiTemplateDir;
+    }
+
+    public String getUiTheme() {
+        return uiTheme;
+    }
+
+    public void setUiTheme(String uiTheme) {
+        this.uiTheme = uiTheme;
+    }
+
+    public String getUiThemeExpansionToken() {
+        return uiThemeExpansionToken;
+    }
+
+    public void setUiThemeExpansionToken(String uiThemeExpansionToken) {
+        this.uiThemeExpansionToken = uiThemeExpansionToken;
+    }
+
+    public Long getMultipartMaxSize() {
+        return multipartMaxSize;
+    }
+
+    public void setMultipartMaxSize(Long multipartMaxSize) {
+        this.multipartMaxSize = multipartMaxSize;
+    }
+
+    public String getMultipartSaveDir() {
+        return multipartSaveDir;
+    }
+
+    public void setMultipartSaveDir(String multipartSaveDir) {
+        this.multipartSaveDir = multipartSaveDir;
+    }
+
+    public Integer getMultipartBufferSize() {
+        return multipartBufferSize;
+    }
+
+    public void setMultipartBufferSize(Integer multipartBufferSize) {
+        this.multipartBufferSize = multipartBufferSize;
+    }
+
+    public BeanConfig getMultipartParser() {
+        return multipartParser;
+    }
+
+    public void setMultipartParser(BeanConfig multipartParser) {
+        this.multipartParser = multipartParser;
+    }
+
+    public void setMultipartParser(Class<?> clazz) {
+        this.multipartParser = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getMultipartEnabled() {
+        return multipartEnabled;
+    }
+
+    public void setMultipartEnabled(Boolean multipartEnabled) {
+        this.multipartEnabled = multipartEnabled;
+    }
+
+    public Pattern getMultipartValidationRegex() {
+        return multipartValidationRegex;
+    }
+
+    public void setMultipartValidationRegex(Pattern multipartValidationRegex) {
+        this.multipartValidationRegex = multipartValidationRegex;
+    }
+
+    public String getObjectFactorySpringAutoWire() {
+        return objectFactorySpringAutoWire;
+    }
+
+    public void setObjectFactorySpringAutoWire(String objectFactorySpringAutoWire) {
+        this.objectFactorySpringAutoWire = objectFactorySpringAutoWire;
+    }
+
+    public Boolean getObjectFactorySpringAutoWireAlwaysRespect() {
+        return objectFactorySpringAutoWireAlwaysRespect;
+    }
+
+    public void setObjectFactorySpringAutoWireAlwaysRespect(Boolean objectFactorySpringAutoWireAlwaysRespect) {
+        this.objectFactorySpringAutoWireAlwaysRespect = objectFactorySpringAutoWireAlwaysRespect;
+    }
+
+    public Boolean getObjectFactorySpringUseClassCache() {
+        return objectFactorySpringUseClassCache;
+    }
+
+    public void setObjectFactorySpringUseClassCache(Boolean objectFactorySpringUseClassCache) {
+        this.objectFactorySpringUseClassCache = objectFactorySpringUseClassCache;
+    }
+
+    public Boolean getObjectFactorySpringEnableAopSupport() {
+        return objectFactorySpringEnableAopSupport;
+    }
+
+    public void setObjectFactorySpringEnableAopSupport(Boolean objectFactorySpringEnableAopSupport) {
+        this.objectFactorySpringEnableAopSupport = objectFactorySpringEnableAopSupport;
+    }
+
+    public Boolean getXsltNocache() {
+        return xsltNocache;
+    }
+
+    public void setXsltNocache(Boolean xsltNocache) {
+        this.xsltNocache = xsltNocache;
+    }
+
+    public List<String> getCustomProperties() {
+        return customProperties;
+    }
+
+    public void setCustomProperties(List<String> customProperties) {
+        this.customProperties = customProperties;
+    }
+
+    public List<String> getCustomI18nResources() {
+        return customI18nResources;
+    }
+
+    public void setCustomI18nResources(List<String> customI18nResources) {
+        this.customI18nResources = customI18nResources;
+    }
+
+    public BeanConfig getMapperClass() {
+        return mapperClass;
+    }
+
+    public void setMapperClass(BeanConfig mapperClass) {
+        this.mapperClass = mapperClass;
+    }
+
+    public void setMapperClass(Class<?> clazz) {
+        this.mapperClass = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public List<String> getMapperPrefixMapping() {
+        return mapperPrefixMapping;
+    }
+
+    public void setMapperPrefixMapping(List<String> mapperPrefixMapping) {
+        this.mapperPrefixMapping = mapperPrefixMapping;
+    }
+
+    public Boolean getServeStatic() {
+        return serveStatic;
+    }
+
+    public void setServeStatic(Boolean serveStatic) {
+        this.serveStatic = serveStatic;
+    }
+
+    public Boolean getServeStaticBrowserCache() {
+        return serveStaticBrowserCache;
+    }
+
+    public void setServeStaticBrowserCache(Boolean serveStaticBrowserCache) {
+        this.serveStaticBrowserCache = serveStaticBrowserCache;
+    }
+
+    public Boolean getEnableDynamicMethodInvocation() {
+        return enableDynamicMethodInvocation;
+    }
+
+    public void setEnableDynamicMethodInvocation(Boolean enableDynamicMethodInvocation) {
+        this.enableDynamicMethodInvocation = enableDynamicMethodInvocation;
+    }
+
+    public Boolean getEnableSlashesInActionNames() {
+        return enableSlashesInActionNames;
+    }
+
+    public void setEnableSlashesInActionNames(Boolean enableSlashesInActionNames) {
+        this.enableSlashesInActionNames = enableSlashesInActionNames;
+    }
+
+    public List<String> getMapperComposite() {
+        return mapperComposite;
+    }
+
+    public void setMapperComposite(List<String> mapperComposite) {
+        this.mapperComposite = mapperComposite;
+    }
+
+    public BeanConfig getActionProxyFactory() {
+        return actionProxyFactory;
+    }
+
+    public void setActionProxyFactory(BeanConfig actionProxyFactory) {
+        this.actionProxyFactory = actionProxyFactory;
+    }
+
+    public void setActionProxyFactory(Class<?> clazz) {
+        this.actionProxyFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getFreemarkerWrapperAltMap() {
+        return freemarkerWrapperAltMap;
+    }
+
+    public void setFreemarkerWrapperAltMap(Boolean freemarkerWrapperAltMap) {
+        this.freemarkerWrapperAltMap = freemarkerWrapperAltMap;
+    }
+
+    public BeanConfig getXworkConverter() {
+        return xworkConverter;
+    }
+
+    public void setXworkConverter(BeanConfig xworkConverter) {
+        this.xworkConverter = xworkConverter;
+    }
+
+    public void setXworkConverter(Class<?> clazz) {
+        this.xworkConverter = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getMapperAlwaysSelectFullNamespace() {
+        return mapperAlwaysSelectFullNamespace;
+    }
+
+    public void setMapperAlwaysSelectFullNamespace(Boolean mapperAlwaysSelectFullNamespace) {
+        this.mapperAlwaysSelectFullNamespace = mapperAlwaysSelectFullNamespace;
+    }
+
+    public BeanConfig getXworkTextProvider() {
+        return xworkTextProvider;
+    }
+
+    public void setXworkTextProvider(BeanConfig xworkTextProvider) {
+        this.xworkTextProvider = xworkTextProvider;
+    }
+
+    public void setXworkTextProvider(Class<?> clazz) {
+        this.xworkTextProvider = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getLocaleProvider() {
+        return localeProvider;
+    }
+
+    public void setLocaleProvider(BeanConfig localeProvider) {
+        this.localeProvider = localeProvider;
+    }
+
+    public void setLocaleProvider(Class<?> clazz) {
+        this.localeProvider = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getLocaleProviderFactory() {
+        return localeProviderFactory;
+    }
+
+    public void setLocaleProviderFactory(BeanConfig localeProviderFactory) {
+        this.localeProviderFactory = localeProviderFactory;
+    }
+
+    public void setLocaleProviderFactory(Class<?> clazz) {
+        this.localeProviderFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public String getMapperIdParameterName() {
+        return mapperIdParameterName;
+    }
+
+    public void setMapperIdParameterName(String mapperIdParameterName) {
+        this.mapperIdParameterName = mapperIdParameterName;
+    }
+
+    public Boolean getOgnlAllowStaticMethodAccess() {
+        return ognlAllowStaticMethodAccess;
+    }
+
+    public void setOgnlAllowStaticMethodAccess(Boolean ognlAllowStaticMethodAccess) {
+        this.ognlAllowStaticMethodAccess = ognlAllowStaticMethodAccess;
+    }
+
+    public BeanConfig getActionValidatorManager() {
+        return actionValidatorManager;
+    }
+
+    public void setActionValidatorManager(BeanConfig actionValidatorManager) {
+        this.actionValidatorManager = actionValidatorManager;
+    }
+
+    public void setActionValidatorManager(Class<?> clazz) {
+        this.actionValidatorManager = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getValueStackFactory() {
+        return valueStackFactory;
+    }
+
+    public void setValueStackFactory(BeanConfig valueStackFactory) {
+        this.valueStackFactory = valueStackFactory;
+    }
+
+    public void setValueStackFactory(Class<?> clazz) {
+        this.valueStackFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getReflectionProvider() {
+        return reflectionProvider;
+    }
+
+    public void setReflectionProvider(BeanConfig reflectionProvider) {
+        this.reflectionProvider = reflectionProvider;
+    }
+
+    public void setReflectionProvider(Class<?> clazz) {
+        this.reflectionProvider = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getReflectionContextFactory() {
+        return reflectionContextFactory;
+    }
+
+    public void setReflectionContextFactory(BeanConfig reflectionContextFactory) {
+        this.reflectionContextFactory = reflectionContextFactory;
+    }
+
+    public void setReflectionContextFactory(Class<?> clazz) {
+        this.reflectionContextFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getPatternMatcher() {
+        return patternMatcher;
+    }
+
+    public void setPatternMatcher(BeanConfig patternMatcher) {
+        this.patternMatcher = patternMatcher;
+    }
+
+    public void setPatternMatcher(Class<?> clazz) {
+        this.patternMatcher = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getStaticContentLoader() {
+        return staticContentLoader;
+    }
+
+    public void setStaticContentLoader(BeanConfig staticContentLoader) {
+        this.staticContentLoader = staticContentLoader;
+    }
+
+    public void setStaticContentLoader(Class<?> clazz) {
+        this.staticContentLoader = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getUnknownHandlerManager() {
+        return unknownHandlerManager;
+    }
+
+    public void setUnknownHandlerManager(BeanConfig unknownHandlerManager) {
+        this.unknownHandlerManager = unknownHandlerManager;
+    }
+
+    public void setUnknownHandlerManager(Class<?> clazz) {
+        this.unknownHandlerManager = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getElThrowExceptionOnFailure() {
+        return elThrowExceptionOnFailure;
+    }
+
+    public void setElThrowExceptionOnFailure(Boolean elThrowExceptionOnFailure) {
+        this.elThrowExceptionOnFailure = elThrowExceptionOnFailure;
+    }
+
+    public Boolean getOgnlLogMissingProperties() {
+        return ognlLogMissingProperties;
+    }
+
+    public void setOgnlLogMissingProperties(Boolean ognlLogMissingProperties) {
+        this.ognlLogMissingProperties = ognlLogMissingProperties;
+    }
+
+    public Boolean getOgnlEnableExpressionCache() {
+        return ognlEnableExpressionCache;
+    }
+
+    public void setOgnlEnableExpressionCache(Boolean ognlEnableExpressionCache) {
+        this.ognlEnableExpressionCache = ognlEnableExpressionCache;
+    }
+
+    public Boolean getOgnlEnableOGNLEvalExpression() {
+        return ognlEnableOGNLEvalExpression;
+    }
+
+    public void setOgnlEnableOGNLEvalExpression(Boolean ognlEnableOGNLEvalExpression) {
+        this.ognlEnableOGNLEvalExpression = ognlEnableOGNLEvalExpression;
+    }
+
+    public Boolean getDisableRequestAttributeValueStackLookup() {
+        return disableRequestAttributeValueStackLookup;
+    }
+
+    public void setDisableRequestAttributeValueStackLookup(Boolean disableRequestAttributeValueStackLookup) {
+        this.disableRequestAttributeValueStackLookup = disableRequestAttributeValueStackLookup;
+    }
+
+    public BeanConfig getViewUrlHelper() {
+        return viewUrlHelper;
+    }
+
+    public void setViewUrlHelper(BeanConfig viewUrlHelper) {
+        this.viewUrlHelper = viewUrlHelper;
+    }
+
+    public void setViewUrlHelper(Class<?> clazz) {
+        this.viewUrlHelper = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterCollection() {
+        return converterCollection;
+    }
+
+    public void setConverterCollection(BeanConfig converterCollection) {
+        this.converterCollection = converterCollection;
+    }
+
+    public void setConverterCollection(Class<?> clazz) {
+        this.converterCollection = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterArray() {
+        return converterArray;
+    }
+
+    public void setConverterArray(BeanConfig converterArray) {
+        this.converterArray = converterArray;
+    }
+
+    public void setConverterArray(Class<?> clazz) {
+        this.converterArray = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterDate() {
+        return converterDate;
+    }
+
+    public void setConverterDate(BeanConfig converterDate) {
+        this.converterDate = converterDate;
+    }
+
+    public void setConverterDate(Class<?> clazz) {
+        this.converterDate = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterNumber() {
+        return converterNumber;
+    }
+
+    public void setConverterNumber(BeanConfig converterNumber) {
+        this.converterNumber = converterNumber;
+    }
+
+    public void setConverterNumber(Class<?> clazz) {
+        this.converterNumber = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterString() {
+        return converterString;
+    }
+
+    public void setConverterString(BeanConfig converterString) {
+        this.converterString = converterString;
+    }
+
+    public void setConverterString(Class<?> clazz) {
+        this.converterString = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getHandleException() {
+        return handleException;
+    }
+
+    public void setHandleException(Boolean handleException) {
+        this.handleException = handleException;
+    }
+
+    public BeanConfig getConverterPropertiesProcessor() {
+        return converterPropertiesProcessor;
+    }
+
+    public void setConverterPropertiesProcessor(BeanConfig converterPropertiesProcessor) {
+        this.converterPropertiesProcessor = converterPropertiesProcessor;
+    }
+
+    public void setConverterPropertiesProcessor(Class<?> clazz) {
+        this.converterPropertiesProcessor = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterFileProcessor() {
+        return converterFileProcessor;
+    }
+
+    public void setConverterFileProcessor(BeanConfig converterFileProcessor) {
+        this.converterFileProcessor = converterFileProcessor;
+    }
+
+    public void setConverterFileProcessor(Class<?> clazz) {
+        this.converterFileProcessor = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterAnnotationProcessor() {
+        return converterAnnotationProcessor;
+    }
+
+    public void setConverterAnnotationProcessor(BeanConfig converterAnnotationProcessor) {
+        this.converterAnnotationProcessor = converterAnnotationProcessor;
+    }
+
+    public void setConverterAnnotationProcessor(Class<?> clazz) {
+        this.converterAnnotationProcessor = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterCreator() {
+        return converterCreator;
+    }
+
+    public void setConverterCreator(BeanConfig converterCreator) {
+        this.converterCreator = converterCreator;
+    }
+
+    public void setConverterCreator(Class<?> clazz) {
+        this.converterCreator = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConverterHolder() {
+        return ConverterHolder;
+    }
+
+    public void setConverterHolder(BeanConfig ConverterHolder) {
+        this.ConverterHolder = ConverterHolder;
+    }
+
+    public void setConverterHolder(Class<?> clazz) {
+        this.ConverterHolder = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getExpressionParser() {
+        return expressionParser;
+    }
+
+    public void setExpressionParser(BeanConfig expressionParser) {
+        this.expressionParser = expressionParser;
+    }
+
+    public void setExpressionParser(Class<?> clazz) {
+        this.expressionParser = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Pattern getAllowedActionNames() {
+        return allowedActionNames;
+    }
+
+    public void setAllowedActionNames(Pattern allowedActionNames) {
+        this.allowedActionNames = allowedActionNames;
+    }
+
+    public String getDefaultActionName() {
+        return defaultActionName;
+    }
+
+    public void setDefaultActionName(String defaultActionName) {
+        this.defaultActionName = defaultActionName;
+    }
+
+    public Pattern getAllowedMethodNames() {
+        return allowedMethodNames;
+    }
+
+    public void setAllowedMethodNames(Pattern allowedMethodNames) {
+        this.allowedMethodNames = allowedMethodNames;
+    }
+
+    public String getDefaultMethodName() {
+        return defaultMethodName;
+    }
+
+    public void setDefaultMethodName(String defaultMethodName) {
+        this.defaultMethodName = defaultMethodName;
+    }
+
+    public Boolean getMapperActionPrefixEnabled() {
+        return mapperActionPrefixEnabled;
+    }
+
+    public void setMapperActionPrefixEnabled(Boolean mapperActionPrefixEnabled) {
+        this.mapperActionPrefixEnabled = mapperActionPrefixEnabled;
+    }
+
+    public Boolean getMapperActionPrefixCrossNamespaces() {
+        return mapperActionPrefixCrossNamespaces;
+    }
+
+    public void setMapperActionPrefixCrossNamespaces(Boolean mapperActionPrefixCrossNamespaces) {
+        this.mapperActionPrefixCrossNamespaces = mapperActionPrefixCrossNamespaces;
+    }
+
+    public String getUiTemplateSuffix() {
+        return uiTemplateSuffix;
+    }
+
+    public void setUiTemplateSuffix(String uiTemplateSuffix) {
+        this.uiTemplateSuffix = uiTemplateSuffix;
+    }
+
+    public BeanConfig getDispatcherErrorHandler() {
+        return dispatcherErrorHandler;
+    }
+
+    public void setDispatcherErrorHandler(BeanConfig dispatcherErrorHandler) {
+        this.dispatcherErrorHandler = dispatcherErrorHandler;
+    }
+
+    public void setDispatcherErrorHandler(Class<?> clazz) {
+        this.dispatcherErrorHandler = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Set<Class<?>> getExcludedClasses() {
+        return excludedClasses;
+    }
+
+    public void setExcludedClasses(Set<Class<?>> excludedClasses) {
+        this.excludedClasses = excludedClasses;
+    }
+
+    public List<Pattern> getExcludedPackageNamePatterns() {
+        return excludedPackageNamePatterns;
+    }
+
+    public void setExcludedPackageNamePatterns(List<Pattern> excludedPackageNamePatterns) {
+        this.excludedPackageNamePatterns = excludedPackageNamePatterns;
+    }
+
+    public Set<String> getExcludedPackageNames() {
+        return excludedPackageNames;
+    }
+
+    public void setExcludedPackageNames(Set<String> excludedPackageNames) {
+        this.excludedPackageNames = excludedPackageNames;
+    }
+
+    public BeanConfig getExcludedPatternsChecker() {
+        return excludedPatternsChecker;
+    }
+
+    public void setExcludedPatternsChecker(BeanConfig excludedPatternsChecker) {
+        this.excludedPatternsChecker = excludedPatternsChecker;
+    }
+
+    public void setExcludedPatternsChecker(Class<?> clazz) {
+        this.excludedPatternsChecker = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getAcceptedPatternsChecker() {
+        return acceptedPatternsChecker;
+    }
+
+    public void setAcceptedPatternsChecker(BeanConfig acceptedPatternsChecker) {
+        this.acceptedPatternsChecker = acceptedPatternsChecker;
+    }
+
+    public void setAcceptedPatternsChecker(Class<?> clazz) {
+        this.acceptedPatternsChecker = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Set<Pattern> getOverrideExcludedPatterns() {
+        return overrideExcludedPatterns;
+    }
+
+    public void setOverrideExcludedPatterns(Set<Pattern> overrideExcludedPatterns) {
+        this.overrideExcludedPatterns = overrideExcludedPatterns;
+    }
+
+    public Set<Pattern> getOverrideAcceptedPatterns() {
+        return overrideAcceptedPatterns;
+    }
+
+    public void setOverrideAcceptedPatterns(Set<Pattern> overrideAcceptedPatterns) {
+        this.overrideAcceptedPatterns = overrideAcceptedPatterns;
+    }
+
+    public Set<Pattern> getAdditionalExcludedPatterns() {
+        return additionalExcludedPatterns;
+    }
+
+    public void setAdditionalExcludedPatterns(Set<Pattern> additionalExcludedPatterns) {
+        this.additionalExcludedPatterns = additionalExcludedPatterns;
+    }
+
+    public Set<Pattern> getAdditionalAcceptedPatterns() {
+        return additionalAcceptedPatterns;
+    }
+
+    public void setAdditionalAcceptedPatterns(Set<Pattern> additionalAcceptedPatterns) {
+        this.additionalAcceptedPatterns = additionalAcceptedPatterns;
+    }
+
+    public BeanConfig getContentTypeMatcher() {
+        return contentTypeMatcher;
+    }
+
+    public void setContentTypeMatcher(BeanConfig contentTypeMatcher) {
+        this.contentTypeMatcher = contentTypeMatcher;
+    }
+
+    public void setContentTypeMatcher(Class<?> clazz) {
+        this.contentTypeMatcher = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public String getStrictMethodInvocationMethodRegex() {
+        return strictMethodInvocationMethodRegex;
+    }
+
+    public void setStrictMethodInvocationMethodRegex(String strictMethodInvocationMethodRegex) {
+        this.strictMethodInvocationMethodRegex = strictMethodInvocationMethodRegex;
+    }
+
+    public BeanConfig getTextProviderFactory() {
+        return textProviderFactory;
+    }
+
+    public void setTextProviderFactory(BeanConfig textProviderFactory) {
+        this.textProviderFactory = textProviderFactory;
+    }
+
+    public void setTextProviderFactory(Class<?> clazz) {
+        this.textProviderFactory = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getLocalizedTextProvider() {
+        return localizedTextProvider;
+    }
+
+    public void setLocalizedTextProvider(BeanConfig localizedTextProvider) {
+        this.localizedTextProvider = localizedTextProvider;
+    }
+
+    public void setLocalizedTextProvider(Class<?> clazz) {
+        this.localizedTextProvider = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getDisallowProxyMemberAccess() {
+        return disallowProxyMemberAccess;
+    }
+
+    public void setDisallowProxyMemberAccess(Boolean disallowProxyMemberAccess) {
+        this.disallowProxyMemberAccess = disallowProxyMemberAccess;
+    }
+}
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
index dcc5fe72a..a6546e52f 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -48,6 +48,8 @@
 import org.apache.struts2.config.DefaultBeanSelectionProvider;
 import org.apache.struts2.config.DefaultPropertiesProvider;
 import org.apache.struts2.config.PropertiesConfigurationProvider;
+import org.apache.struts2.config.StrutsJavaConfiguration;
+import org.apache.struts2.config.StrutsJavaConfigurationProvider;
 import org.apache.struts2.config.StrutsXmlConfigurationProvider;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
@@ -411,6 +413,30 @@ protected XmlConfigurationProvider createStrutsXmlConfigurationProvider(String f
         return new StrutsXmlConfigurationProvider(filename, errorIfMissing, ctx);
     }
 
+    private void init_JavaConfigurations() {
+        String configClasses = initParams.get("javaConfigClasses");
+        if (configClasses != null) {
+            String[] classes = configClasses.split("\\s*[,]\\s*");
+            for (String cname : classes) {
+                try {
+                    Class cls = ClassLoaderUtil.loadClass(cname, this.getClass());
+                    StrutsJavaConfiguration config = (StrutsJavaConfiguration) cls.newInstance();
+                    configurationManager.addContainerProvider(createJavaConfigurationProvider(config));
+                } catch (InstantiationException e) {
+                    throw new ConfigurationException("Unable to instantiate java configuration: " + cname, e);
+                } catch (IllegalAccessException e) {
+                    throw new ConfigurationException("Unable to access java configuration: " + cname, e);
+                } catch (ClassNotFoundException e) {
+                    throw new ConfigurationException("Unable to locate java configuration class: " + cname, e);
+                }
+            }
+        }
+    }
+
+    protected StrutsJavaConfigurationProvider createJavaConfigurationProvider(StrutsJavaConfiguration config) {
+        return new StrutsJavaConfigurationProvider(config);
+    }
+
     private void init_CustomConfigurationProviders() {
         String configProvs = initParams.get("configProviders");
         if (configProvs != null) {
@@ -488,6 +514,7 @@ public void init() {
             init_FileManager();
             init_DefaultProperties(); // [1]
             init_TraditionalXmlConfigurations(); // [2]
+            init_JavaConfigurations();
             init_LegacyStrutsProperties(); // [3]
             init_CustomConfigurationProviders(); // [5]
             init_FilterInitParameters() ; // [6]
diff --git a/core/src/test/java/com/opensymphony/xwork2/util/location/LocationUtilsTest.java b/core/src/test/java/com/opensymphony/xwork2/util/location/LocationUtilsTest.java
index f9ee326c6..a47d71826 100644
--- a/core/src/test/java/com/opensymphony/xwork2/util/location/LocationUtilsTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/util/location/LocationUtilsTest.java
@@ -18,6 +18,12 @@
  */
 package com.opensymphony.xwork2.util.location;
 
+import java.util.List;
+
+import org.apache.struts2.config.StrutsJavaConfiguration;
+import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.ConstantConfig;
+
 import junit.framework.TestCase;
 
 public class LocationUtilsTest extends TestCase {
@@ -53,4 +59,25 @@ public void testGetLocation_exception() throws Exception {
     				"com/opensymphony/xwork2/util/location/LocationUtilsTest.java"
     				.equals(loc.getURI()));
     }
+
+    public void testGetLocationStrutsJavaConfiguration() throws Exception {
+        StrutsJavaConfiguration conf = new StrutsJavaConfiguration() {
+            @Override
+            public List<String> unknownHandlerStack() {
+                return null;
+            }
+            @Override
+            public List<ConstantConfig> constants() {
+                return null;
+            }
+            @Override
+            public List<BeanConfig> beans() {
+                return null;
+            }
+        };
+        Location loc = LocationUtils.getLocation(conf, null);
+
+        assertNotNull(loc);
+        assertEquals(conf.toString(), loc.getURI());
+    }
 }
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/config/entities/ConventionConstantConfig.java b/plugins/convention/src/main/java/org/apache/struts2/convention/config/entities/ConventionConstantConfig.java
new file mode 100644
index 000000000..50bca2c88
--- /dev/null
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/config/entities/ConventionConstantConfig.java
@@ -0,0 +1,330 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.convention.config.entities;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.ConstantConfig;
+import org.apache.struts2.convention.ConventionConstants;
+
+public class ConventionConstantConfig extends ConstantConfig {
+    private BeanConfig conventionActionConfigBuilder;
+    private BeanConfig conventionActionNameBuilder;
+    private BeanConfig conventionResultMapBuilder;
+    private BeanConfig conventionInterceptorMapBuilder;
+    private BeanConfig conventionConventionsService;
+    private Boolean conventionActionNameLowercase;
+    private String conventionActionNameSeparator;
+    private Set<String> conventionActionSuffix;
+    private Boolean conventionClassesReload;
+    private String conventionResultPath;
+    private String conventionDefaultParentPackage;
+    private Boolean conventionRedirectToSlash;
+    private Set<String> conventionRelativeResultTypes;
+    private Boolean conventionExcludeParentClassLoader;
+    private Boolean conventionActionAlwaysMapExecute;
+    private Set<String> conventionActionFileProtocols;
+    private Boolean conventionActionDisableScanning;
+    private List<String> conventionActionIncludeJars;
+    private Boolean conventionPackageLocatorsDisable;
+    private List<String> conventionActionPackages;
+    private Boolean conventionActionCheckImplementsAction;
+    private List<String> conventionExcludePackages;
+    private List<String> conventionPackageLocators;
+    private String conventionPackageLocatorsBasePackage;
+    private Boolean conventionActionMapAllMatches;
+    private Boolean conventionActionEagerLoading;
+    private Boolean conventionResultFlatLayout;
+
+    @Override
+    public Map<String, String> getAllAsStringsMap() {
+        Map<String, String> map = super.getAllAsStringsMap();
+
+        map.put(ConventionConstants.CONVENTION_ACTION_CONFIG_BUILDER, beanConfToString(conventionActionConfigBuilder));
+        map.put(ConventionConstants.CONVENTION_ACTION_NAME_BUILDER, beanConfToString(conventionActionNameBuilder));
+        map.put(ConventionConstants.CONVENTION_RESULT_MAP_BUILDER, beanConfToString(conventionResultMapBuilder));
+        map.put(ConventionConstants.CONVENTION_INTERCEPTOR_MAP_BUILDER, beanConfToString(conventionInterceptorMapBuilder));
+        map.put(ConventionConstants.CONVENTION_CONVENTIONS_SERVICE, beanConfToString(conventionConventionsService));
+        map.put(ConventionConstants.CONVENTION_ACTION_NAME_LOWERCASE, Objects.toString(conventionActionNameLowercase, null));
+        map.put(ConventionConstants.CONVENTION_ACTION_NAME_SEPARATOR, conventionActionNameSeparator);
+        map.put(ConventionConstants.CONVENTION_ACTION_SUFFIX, StringUtils.join(conventionActionSuffix, ','));
+        map.put(ConventionConstants.CONVENTION_CLASSES_RELOAD, Objects.toString(conventionClassesReload, null));
+        map.put(ConventionConstants.CONVENTION_RESULT_PATH, conventionResultPath);
+        map.put(ConventionConstants.CONVENTION_DEFAULT_PARENT_PACKAGE, conventionDefaultParentPackage);
+        map.put(ConventionConstants.CONVENTION_REDIRECT_TO_SLASH, Objects.toString(conventionRedirectToSlash, null));
+        map.put(ConventionConstants.CONVENTION_RELATIVE_RESULT_TYPES, StringUtils.join(conventionRelativeResultTypes, ','));
+        map.put(ConventionConstants.CONVENTION_EXCLUDE_PARENT_CLASS_LOADER, Objects.toString(conventionExcludeParentClassLoader, null));
+        map.put(ConventionConstants.CONVENTION_ACTION_ALWAYS_MAP_EXECUTE, Objects.toString(conventionActionAlwaysMapExecute, null));
+        map.put(ConventionConstants.CONVENTION_ACTION_FILE_PROTOCOLS, StringUtils.join(conventionActionFileProtocols, ','));
+        map.put(ConventionConstants.CONVENTION_ACTION_DISABLE_SCANNING, Objects.toString(conventionActionDisableScanning, null));
+        map.put(ConventionConstants.CONVENTION_ACTION_INCLUDE_JARS, StringUtils.join(conventionActionIncludeJars, ','));
+        map.put(ConventionConstants.CONVENTION_PACKAGE_LOCATORS_DISABLE, Objects.toString(conventionPackageLocatorsDisable, null));
+        map.put(ConventionConstants.CONVENTION_ACTION_PACKAGES, StringUtils.join(conventionActionPackages, ','));
+        map.put(ConventionConstants.CONVENTION_ACTION_CHECK_IMPLEMENTS_ACTION, Objects.toString(conventionActionCheckImplementsAction, null));
+        map.put(ConventionConstants.CONVENTION_EXCLUDE_PACKAGES, StringUtils.join(conventionExcludePackages, ','));
+        map.put(ConventionConstants.CONVENTION_PACKAGE_LOCATORS, StringUtils.join(conventionPackageLocators, ','));
+        map.put(ConventionConstants.CONVENTION_PACKAGE_LOCATORS_BASE_PACKAGE, conventionPackageLocatorsBasePackage);
+        map.put(ConventionConstants.CONVENTION_ACTION_MAP_ALL_MATCHES, Objects.toString(conventionActionMapAllMatches, null));
+        map.put(ConventionConstants.CONVENTION_ACTION_EAGER_LOADING, Objects.toString(conventionActionEagerLoading, null));
+        map.put(ConventionConstants.CONVENTION_RESULT_FLAT_LAYOUT, Objects.toString(conventionResultFlatLayout, null));
+
+        return map;
+    }
+
+    public BeanConfig getConventionActionConfigBuilder() {
+        return conventionActionConfigBuilder;
+    }
+
+    public void setConventionActionConfigBuilder(BeanConfig conventionActionConfigBuilder) {
+        this.conventionActionConfigBuilder = conventionActionConfigBuilder;
+    }
+
+    public void setConventionActionConfigBuilder(Class<?> clazz) {
+        this.conventionActionConfigBuilder = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConventionActionNameBuilder() {
+        return conventionActionNameBuilder;
+    }
+
+    public void setConventionActionNameBuilder(BeanConfig conventionActionNameBuilder) {
+        this.conventionActionNameBuilder = conventionActionNameBuilder;
+    }
+
+    public void setConventionActionNameBuilder(Class<?> clazz) {
+        this.conventionActionNameBuilder = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConventionResultMapBuilder() {
+        return conventionResultMapBuilder;
+    }
+
+    public void setConventionResultMapBuilder(BeanConfig conventionResultMapBuilder) {
+        this.conventionResultMapBuilder = conventionResultMapBuilder;
+    }
+
+    public void setConventionResultMapBuilder(Class<?> clazz) {
+        this.conventionResultMapBuilder = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConventionInterceptorMapBuilder() {
+        return conventionInterceptorMapBuilder;
+    }
+
+    public void setConventionInterceptorMapBuilder(BeanConfig conventionInterceptorMapBuilder) {
+        this.conventionInterceptorMapBuilder = conventionInterceptorMapBuilder;
+    }
+
+    public void setConventionInterceptorMapBuilder(Class<?> clazz) {
+        this.conventionInterceptorMapBuilder = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public BeanConfig getConventionConventionsService() {
+        return conventionConventionsService;
+    }
+
+    public void setConventionConventionsService(BeanConfig conventionConventionsService) {
+        this.conventionConventionsService = conventionConventionsService;
+    }
+
+    public void setConventionConventionsService(Class<?> clazz) {
+        this.conventionConventionsService = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getConventionActionNameLowercase() {
+        return conventionActionNameLowercase;
+    }
+
+    public void setConventionActionNameLowercase(Boolean conventionActionNameLowercase) {
+        this.conventionActionNameLowercase = conventionActionNameLowercase;
+    }
+
+    public String getConventionActionNameSeparator() {
+        return conventionActionNameSeparator;
+    }
+
+    public void setConventionActionNameSeparator(String conventionActionNameSeparator) {
+        this.conventionActionNameSeparator = conventionActionNameSeparator;
+    }
+
+    public Set<String> getConventionActionSuffix() {
+        return conventionActionSuffix;
+    }
+
+    public void setConventionActionSuffix(Set<String> conventionActionSuffix) {
+        this.conventionActionSuffix = conventionActionSuffix;
+    }
+
+    public Boolean getConventionClassesReload() {
+        return conventionClassesReload;
+    }
+
+    public void setConventionClassesReload(Boolean conventionClassesReload) {
+        this.conventionClassesReload = conventionClassesReload;
+    }
+
+    public String getConventionResultPath() {
+        return conventionResultPath;
+    }
+
+    public void setConventionResultPath(String conventionResultPath) {
+        this.conventionResultPath = conventionResultPath;
+    }
+
+    public String getConventionDefaultParentPackage() {
+        return conventionDefaultParentPackage;
+    }
+
+    public void setConventionDefaultParentPackage(String conventionDefaultParentPackage) {
+        this.conventionDefaultParentPackage = conventionDefaultParentPackage;
+    }
+
+    public Boolean getConventionRedirectToSlash() {
+        return conventionRedirectToSlash;
+    }
+
+    public void setConventionRedirectToSlash(Boolean conventionRedirectToSlash) {
+        this.conventionRedirectToSlash = conventionRedirectToSlash;
+    }
+
+    public Set<String> getConventionRelativeResultTypes() {
+        return conventionRelativeResultTypes;
+    }
+
+    public void setConventionRelativeResultTypes(Set<String> conventionRelativeResultTypes) {
+        this.conventionRelativeResultTypes = conventionRelativeResultTypes;
+    }
+
+    public Boolean getConventionExcludeParentClassLoader() {
+        return conventionExcludeParentClassLoader;
+    }
+
+    public void setConventionExcludeParentClassLoader(Boolean conventionExcludeParentClassLoader) {
+        this.conventionExcludeParentClassLoader = conventionExcludeParentClassLoader;
+    }
+
+    public Boolean getConventionActionAlwaysMapExecute() {
+        return conventionActionAlwaysMapExecute;
+    }
+
+    public void setConventionActionAlwaysMapExecute(Boolean conventionActionAlwaysMapExecute) {
+        this.conventionActionAlwaysMapExecute = conventionActionAlwaysMapExecute;
+    }
+
+    public Set<String> getConventionActionFileProtocols() {
+        return conventionActionFileProtocols;
+    }
+
+    public void setConventionActionFileProtocols(Set<String> conventionActionFileProtocols) {
+        this.conventionActionFileProtocols = conventionActionFileProtocols;
+    }
+
+    public Boolean getConventionActionDisableScanning() {
+        return conventionActionDisableScanning;
+    }
+
+    public void setConventionActionDisableScanning(Boolean conventionActionDisableScanning) {
+        this.conventionActionDisableScanning = conventionActionDisableScanning;
+    }
+
+    public List<String> getConventionActionIncludeJars() {
+        return conventionActionIncludeJars;
+    }
+
+    public void setConventionActionIncludeJars(List<String> conventionActionIncludeJars) {
+        this.conventionActionIncludeJars = conventionActionIncludeJars;
+    }
+
+    public Boolean getConventionPackageLocatorsDisable() {
+        return conventionPackageLocatorsDisable;
+    }
+
+    public void setConventionPackageLocatorsDisable(Boolean conventionPackageLocatorsDisable) {
+        this.conventionPackageLocatorsDisable = conventionPackageLocatorsDisable;
+    }
+
+    public List<String> getConventionActionPackages() {
+        return conventionActionPackages;
+    }
+
+    public void setConventionActionPackages(List<String> conventionActionPackages) {
+        this.conventionActionPackages = conventionActionPackages;
+    }
+
+    public Boolean getConventionActionCheckImplementsAction() {
+        return conventionActionCheckImplementsAction;
+    }
+
+    public void setConventionActionCheckImplementsAction(Boolean conventionActionCheckImplementsAction) {
+        this.conventionActionCheckImplementsAction = conventionActionCheckImplementsAction;
+    }
+
+    public List<String> getConventionExcludePackages() {
+        return conventionExcludePackages;
+    }
+
+    public void setConventionExcludePackages(List<String> conventionExcludePackages) {
+        this.conventionExcludePackages = conventionExcludePackages;
+    }
+
+    public List<String> getConventionPackageLocators() {
+        return conventionPackageLocators;
+    }
+
+    public void setConventionPackageLocators(List<String> conventionPackageLocators) {
+        this.conventionPackageLocators = conventionPackageLocators;
+    }
+
+    public String getConventionPackageLocatorsBasePackage() {
+        return conventionPackageLocatorsBasePackage;
+    }
+
+    public void setConventionPackageLocatorsBasePackage(String conventionPackageLocatorsBasePackage) {
+        this.conventionPackageLocatorsBasePackage = conventionPackageLocatorsBasePackage;
+    }
+
+    public Boolean getConventionActionMapAllMatches() {
+        return conventionActionMapAllMatches;
+    }
+
+    public void setConventionActionMapAllMatches(Boolean conventionActionMapAllMatches) {
+        this.conventionActionMapAllMatches = conventionActionMapAllMatches;
+    }
+
+    public Boolean getConventionActionEagerLoading() {
+        return conventionActionEagerLoading;
+    }
+
+    public void setConventionActionEagerLoading(Boolean conventionActionEagerLoading) {
+        this.conventionActionEagerLoading = conventionActionEagerLoading;
+    }
+
+    public Boolean getConventionResultFlatLayout() {
+        return conventionResultFlatLayout;
+    }
+
+    public void setConventionResultFlatLayout(Boolean conventionResultFlatLayout) {
+        this.conventionResultFlatLayout = conventionResultFlatLayout;
+    }
+}
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONConstants.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONConstants.java
index e3dbf4b7b..f5cb292bd 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONConstants.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONConstants.java
@@ -30,4 +30,5 @@
 
     public static final String JSON_WRITER = "struts.json.writer";
     public static final String RESULT_EXCLUDE_PROXY_PROPERTIES = "struts.json.result.excludeProxyProperties";
+    public static final String DATE_FORMAT = "struts.json.dateformat";
 }
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index 4eba2630d..0547e92c8 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -456,7 +456,7 @@ public String getDefaultDateFormat() {
         return defaultDateFormat;
     }
 
-    @Inject(required=false,value="struts.json.dateformat")
+    @Inject(required = false, value = JSONConstants.DATE_FORMAT)
     public void setDefaultDateFormat(String defaultDateFormat) {
         this.defaultDateFormat = defaultDateFormat;
     }
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/config/entities/JSONConstantConfig.java b/plugins/json/src/main/java/org/apache/struts2/json/config/entities/JSONConstantConfig.java
new file mode 100644
index 000000000..ee7fab60f
--- /dev/null
+++ b/plugins/json/src/main/java/org/apache/struts2/json/config/entities/JSONConstantConfig.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.json.config.entities;
+
+import java.util.Map;
+import java.util.Objects;
+
+import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.ConstantConfig;
+import org.apache.struts2.json.JSONConstants;
+
+public class JSONConstantConfig extends ConstantConfig {
+    private BeanConfig jsonWriter;
+    private Boolean jsonResultExcludeProxyProperties;
+    private String jsonDateFormat;
+
+    @Override
+    public Map<String, String> getAllAsStringsMap() {
+        Map<String, String> map = super.getAllAsStringsMap();
+
+        map.put(JSONConstants.JSON_WRITER, beanConfToString(jsonWriter));
+        map.put(JSONConstants.RESULT_EXCLUDE_PROXY_PROPERTIES, Objects.toString(jsonResultExcludeProxyProperties, null));
+        map.put(JSONConstants.DATE_FORMAT, jsonDateFormat);
+
+        return map;
+    }
+
+    public BeanConfig getJsonWriter() {
+        return jsonWriter;
+    }
+
+    public void setJsonWriter(BeanConfig jsonWriter) {
+        this.jsonWriter = jsonWriter;
+    }
+
+    public void setJsonWriter(Class<?> clazz) {
+        this.jsonWriter = new BeanConfig(clazz, clazz.getName());
+    }
+
+    public Boolean getJsonResultExcludeProxyProperties() {
+        return jsonResultExcludeProxyProperties;
+    }
+
+    public void setJsonResultExcludeProxyProperties(Boolean jsonResultExcludeProxyProperties) {
+        this.jsonResultExcludeProxyProperties = jsonResultExcludeProxyProperties;
+    }
+
+    public String getJsonDateFormat() {
+        return jsonDateFormat;
+    }
+
+    public void setJsonDateFormat(String jsonDateFormat) {
+        this.jsonDateFormat = jsonDateFormat;
+    }
+}
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java b/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
index 8379a027b..c2c89f544 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
@@ -50,7 +50,7 @@
 
     private String defaultExtension;
 
-    @Inject("struts.rest.defaultExtension")
+    @Inject(RestConstants.REST_DEFAULT_EXTENSION)
     public void setDefaultExtension(String name) {
         this.defaultExtension = name;
     }
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
index e018591c6..0067085ab 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
@@ -64,12 +64,12 @@ protected RestActionInvocation(final Map<String, Object> extraContext, boolean p
         super(extraContext, pushAction);
     }
 
-    @Inject("struts.rest.logger")
+    @Inject(RestConstants.REST_LOGGER)
     public void setLogger(String logger) {
         this.logger = BooleanUtils.toBoolean(logger);
     }
 
-    @Inject("struts.rest.defaultErrorResultName")
+    @Inject(RestConstants.REST_DEFAULT_ERROR_RESULT_NAME)
     public void setDefaultErrorResultName(String defaultErrorResultName) {
         this.defaultErrorResultName = defaultErrorResultName;
     }
@@ -80,7 +80,7 @@ public void setDefaultErrorResultName(String defaultErrorResultName) {
      * 
      * @param restrictToGet true or false
      */
-    @Inject(value = "struts.rest.content.restrictToGET", required = false)
+    @Inject(value = RestConstants.REST_CONTENT_RESTRICT_TO_GET, required = false)
     public void setRestrictToGet(String restrictToGet) {
         this.restrictToGet = BooleanUtils.toBoolean(restrictToGet);
     }
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
index 1503ae224..61fef60c2 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
@@ -130,52 +130,52 @@ public void setIdParameterName(String idParameterName) {
         this.idParameterName = idParameterName;
     }
 
-    @Inject(required=false,value="struts.mapper.indexMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_INDEX_METHOD_NAME)
     public void setIndexMethodName(String indexMethodName) {
         this.indexMethodName = indexMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.getMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_GET_METHOD_NAME)
     public void setGetMethodName(String getMethodName) {
         this.getMethodName = getMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.postMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_POST_METHOD_NAME)
     public void setPostMethodName(String postMethodName) {
         this.postMethodName = postMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.editMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_EDIT_METHOD_NAME)
     public void setEditMethodName(String editMethodName) {
         this.editMethodName = editMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.newMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_NEW_METHOD_NAME)
     public void setNewMethodName(String newMethodName) {
         this.newMethodName = newMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.deleteMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_DELETE_METHOD_NAME)
     public void setDeleteMethodName(String deleteMethodName) {
         this.deleteMethodName = deleteMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.putMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_PUT_METHOD_NAME)
     public void setPutMethodName(String putMethodName) {
         this.putMethodName = putMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.optionsMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_OPTIONS_METHOD_NAME)
     public void setOptionsMethodName(String optionsMethodName) {
         this.optionsMethodName = optionsMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.postContinueMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_POST_CONTINUE_METHOD_NAME)
     public void setPostContinueMethodName(String postContinueMethodName) {
         this.postContinueMethodName = postContinueMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.putContinueMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_PUT_CONTINUE_METHOD_NAME)
     public void setPutContinueMethodName(String putContinueMethodName) {
         this.putContinueMethodName = putContinueMethodName;
     }
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java
index 3794faa8d..33227d831 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java
@@ -31,11 +31,9 @@
  */
 public class RestActionProxyFactory extends DefaultActionProxyFactory {
 
-    public static final String STRUTS_REST_NAMESPACE = "struts.rest.namespace";
-
     protected String namespace;
 
-    @Inject(value = STRUTS_REST_NAMESPACE, required = false)
+    @Inject(value = RestConstants.STRUTS_REST_NAMESPACE, required = false)
     public void setNamespace(String namespace) {
         this.namespace = namespace;
     }
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestConstants.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestConstants.java
new file mode 100644
index 000000000..cb47b6a93
--- /dev/null
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestConstants.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.rest;
+
+public class RestConstants {
+    public static final String REST_DEFAULT_EXTENSION = "struts.rest.defaultExtension";
+    public static final String REST_LOGGER = "struts.rest.logger";
+    public static final String REST_DEFAULT_ERROR_RESULT_NAME = "struts.rest.defaultErrorResultName";
+    public static final String REST_CONTENT_RESTRICT_TO_GET = "struts.rest.content.restrictToGET";
+    public static final String REST_MAPPER_INDEX_METHOD_NAME = "struts.mapper.indexMethodName";
+    public static final String REST_MAPPER_GET_METHOD_NAME = "struts.mapper.getMethodName";
+    public static final String REST_MAPPER_POST_METHOD_NAME = "struts.mapper.postMethodName";
+    public static final String REST_MAPPER_EDIT_METHOD_NAME = "struts.mapper.editMethodName";
+    public static final String REST_MAPPER_NEW_METHOD_NAME = "struts.mapper.newMethodName";
+    public static final String REST_MAPPER_DELETE_METHOD_NAME = "struts.mapper.deleteMethodName";
+    public static final String REST_MAPPER_PUT_METHOD_NAME = "struts.mapper.putMethodName";
+    public static final String REST_MAPPER_OPTIONS_METHOD_NAME = "struts.mapper.optionsMethodName";
+    public static final String REST_MAPPER_POST_CONTINUE_METHOD_NAME = "struts.mapper.postContinueMethodName";
+    public static final String REST_MAPPER_PUT_CONTINUE_METHOD_NAME = "struts.mapper.putContinueMethodName";
+    public static final String STRUTS_REST_NAMESPACE = "struts.rest.namespace";
+    public static final String REST_VALIDATION_FAILURE_STATUS_CODE = "struts.rest.validationFailureStatusCode";
+}
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
index 37122259b..f685fa38d 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
@@ -146,27 +146,27 @@
 
     private int validationFailureStatusCode = SC_BAD_REQUEST;
 
-    @Inject(required=false,value="struts.mapper.postMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_POST_METHOD_NAME)
     public void setPostMethodName(String postMethodName) {
         this.postMethodName = postMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.editMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_EDIT_METHOD_NAME)
     public void setEditMethodName(String editMethodName) {
         this.editMethodName = editMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.newMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_NEW_METHOD_NAME)
     public void setNewMethodName(String newMethodName) {
         this.newMethodName = newMethodName;
     }
 
-    @Inject(required=false,value="struts.mapper.putMethodName")
+    @Inject(required = false, value = RestConstants.REST_MAPPER_PUT_METHOD_NAME)
     public void setPutMethodName(String putMethodName) {
         this.putMethodName = putMethodName;
     }
 
-    @Inject(required=false,value="struts.rest.validationFailureStatusCode")
+    @Inject(required = false, value = RestConstants.REST_VALIDATION_FAILURE_STATUS_CODE)
     public void setValidationFailureStatusCode(String code) {
         this.validationFailureStatusCode = Integer.parseInt(code);
     }
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/config/entities/RestConstantConfig.java b/plugins/rest/src/main/java/org/apache/struts2/rest/config/entities/RestConstantConfig.java
new file mode 100644
index 000000000..d83f01b42
--- /dev/null
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/config/entities/RestConstantConfig.java
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.rest.config.entities;
+
+import java.util.Map;
+import java.util.Objects;
+
+import org.apache.struts2.config.entities.ConstantConfig;
+import org.apache.struts2.rest.RestConstants;
+
+public class RestConstantConfig extends ConstantConfig {
+    private String restDefaultExtension;
+    private Boolean restLogger;
+    private String restDefaultErrorResultName;
+    private Boolean restContentRestrictToGet;
+    private String mapperIndexMethodName;
+    private String mapperGetMethodName;
+    private String mapperPostMethodName;
+    private String mapperEditMethodName;
+    private String mapperNewMethodName;
+    private String mapperDeleteMethodName;
+    private String mapperPutMethodName;
+    private String mapperOptionsMethodName;
+    private String mapperPostContinueMethodName;
+    private String mapperPutContinueMethodName;
+    private String restNamespace;
+    private String restValidationFailureStatusCode;
+
+    @Override
+    public Map<String, String> getAllAsStringsMap() {
+        Map<String, String> map = super.getAllAsStringsMap();
+
+        map.put(RestConstants.REST_DEFAULT_EXTENSION, restDefaultExtension);
+        map.put(RestConstants.REST_LOGGER, Objects.toString(restLogger, null));
+        map.put(RestConstants.REST_DEFAULT_ERROR_RESULT_NAME, restDefaultErrorResultName);
+        map.put(RestConstants.REST_CONTENT_RESTRICT_TO_GET, Objects.toString(restContentRestrictToGet, null));
+        map.put(RestConstants.REST_MAPPER_INDEX_METHOD_NAME, mapperIndexMethodName);
+        map.put(RestConstants.REST_MAPPER_GET_METHOD_NAME, mapperGetMethodName);
+        map.put(RestConstants.REST_MAPPER_POST_METHOD_NAME, mapperPostMethodName);
+        map.put(RestConstants.REST_MAPPER_EDIT_METHOD_NAME, mapperEditMethodName);
+        map.put(RestConstants.REST_MAPPER_NEW_METHOD_NAME, mapperNewMethodName);
+        map.put(RestConstants.REST_MAPPER_DELETE_METHOD_NAME, mapperDeleteMethodName);
+        map.put(RestConstants.REST_MAPPER_PUT_METHOD_NAME, mapperPutMethodName);
+        map.put(RestConstants.REST_MAPPER_OPTIONS_METHOD_NAME, mapperOptionsMethodName);
+        map.put(RestConstants.REST_MAPPER_POST_CONTINUE_METHOD_NAME, mapperPostContinueMethodName);
+        map.put(RestConstants.REST_MAPPER_PUT_CONTINUE_METHOD_NAME, mapperPutContinueMethodName);
+        map.put(RestConstants.STRUTS_REST_NAMESPACE, restNamespace);
+        map.put(RestConstants.REST_VALIDATION_FAILURE_STATUS_CODE, restValidationFailureStatusCode);
+
+        return map;
+    }
+
+    public String getRestDefaultExtension() {
+        return restDefaultExtension;
+    }
+
+    public void setRestDefaultExtension(String restDefaultExtension) {
+        this.restDefaultExtension = restDefaultExtension;
+    }
+
+    public Boolean getRestLogger() {
+        return restLogger;
+    }
+
+    public void setRestLogger(Boolean restLogger) {
+        this.restLogger = restLogger;
+    }
+
+    public String getRestDefaultErrorResultName() {
+        return restDefaultErrorResultName;
+    }
+
+    public void setRestDefaultErrorResultName(String restDefaultErrorResultName) {
+        this.restDefaultErrorResultName = restDefaultErrorResultName;
+    }
+
+    public Boolean getRestContentRestrictToGet() {
+        return restContentRestrictToGet;
+    }
+
+    public void setRestContentRestrictToGet(Boolean restContentRestrictToGet) {
+        this.restContentRestrictToGet = restContentRestrictToGet;
+    }
+
+    public String getMapperIndexMethodName() {
+        return mapperIndexMethodName;
+    }
+
+    public void setMapperIndexMethodName(String mapperIndexMethodName) {
+        this.mapperIndexMethodName = mapperIndexMethodName;
+    }
+
+    public String getMapperGetMethodName() {
+        return mapperGetMethodName;
+    }
+
+    public void setMapperGetMethodName(String mapperGetMethodName) {
+        this.mapperGetMethodName = mapperGetMethodName;
+    }
+
+    public String getMapperPostMethodName() {
+        return mapperPostMethodName;
+    }
+
+    public void setMapperPostMethodName(String mapperPostMethodName) {
+        this.mapperPostMethodName = mapperPostMethodName;
+    }
+
+    public String getMapperEditMethodName() {
+        return mapperEditMethodName;
+    }
+
+    public void setMapperEditMethodName(String mapperEditMethodName) {
+        this.mapperEditMethodName = mapperEditMethodName;
+    }
+
+    public String getMapperNewMethodName() {
+        return mapperNewMethodName;
+    }
+
+    public void setMapperNewMethodName(String mapperNewMethodName) {
+        this.mapperNewMethodName = mapperNewMethodName;
+    }
+
+    public String getMapperDeleteMethodName() {
+        return mapperDeleteMethodName;
+    }
+
+    public void setMapperDeleteMethodName(String mapperDeleteMethodName) {
+        this.mapperDeleteMethodName = mapperDeleteMethodName;
+    }
+
+    public String getMapperPutMethodName() {
+        return mapperPutMethodName;
+    }
+
+    public void setMapperPutMethodName(String mapperPutMethodName) {
+        this.mapperPutMethodName = mapperPutMethodName;
+    }
+
+    public String getMapperOptionsMethodName() {
+        return mapperOptionsMethodName;
+    }
+
+    public void setMapperOptionsMethodName(String mapperOptionsMethodName) {
+        this.mapperOptionsMethodName = mapperOptionsMethodName;
+    }
+
+    public String getMapperPostContinueMethodName() {
+        return mapperPostContinueMethodName;
+    }
+
+    public void setMapperPostContinueMethodName(String mapperPostContinueMethodName) {
+        this.mapperPostContinueMethodName = mapperPostContinueMethodName;
+    }
+
+    public String getMapperPutContinueMethodName() {
+        return mapperPutContinueMethodName;
+    }
+
+    public void setMapperPutContinueMethodName(String mapperPutContinueMethodName) {
+        this.mapperPutContinueMethodName = mapperPutContinueMethodName;
+    }
+
+    public String getRestNamespace() {
+        return restNamespace;
+    }
+
+    public void setRestNamespace(String restNamespace) {
+        this.restNamespace = restNamespace;
+    }
+
+    public String getRestValidationFailureStatusCode() {
+        return restValidationFailureStatusCode;
+    }
+
+    public void setRestValidationFailureStatusCode(String restValidationFailureStatusCode) {
+        this.restValidationFailureStatusCode = restValidationFailureStatusCode;
+    }
+}
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/SpringConstants.java b/plugins/spring/src/main/java/org/apache/struts2/spring/SpringConstants.java
new file mode 100644
index 000000000..f174e2ff6
--- /dev/null
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/SpringConstants.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.spring;
+
+public class SpringConstants {
+    public static final String SPRING_CLASS_RELOADING_WATCH_LIST = "struts.class.reloading.watchList";
+    public static final String SPRING_CLASS_RELOADING_ACCEPT_CLASSES = "struts.class.reloading.acceptClasses";
+    public static final String SPRING_CLASS_RELOADING_RELOAD_CONFIG = "struts.class.reloading.reloadConfig";
+}
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java b/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
index 8d6c229a7..157518c27 100644
--- a/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
@@ -94,9 +94,9 @@ public StrutsSpringObjectFactory(
             return;
         }
         
-        String watchList = container.getInstance(String.class, "struts.class.reloading.watchList");
-        String acceptClasses = container.getInstance(String.class, "struts.class.reloading.acceptClasses");
-        String reloadConfig = container.getInstance(String.class, "struts.class.reloading.reloadConfig");
+        String watchList = container.getInstance(String.class, SpringConstants.SPRING_CLASS_RELOADING_WATCH_LIST);
+        String acceptClasses = container.getInstance(String.class, SpringConstants.SPRING_CLASS_RELOADING_ACCEPT_CLASSES);
+        String reloadConfig = container.getInstance(String.class, SpringConstants.SPRING_CLASS_RELOADING_RELOAD_CONFIG);
 
         if ("true".equals(devMode)
                 && StringUtils.isNotBlank(watchList)
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/config/entities/SpringConstantConfig.java b/plugins/spring/src/main/java/org/apache/struts2/spring/config/entities/SpringConstantConfig.java
new file mode 100644
index 000000000..d948490ba
--- /dev/null
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/config/entities/SpringConstantConfig.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.spring.config.entities;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.struts2.config.entities.ConstantConfig;
+import org.apache.struts2.spring.SpringConstants;
+
+public class SpringConstantConfig extends ConstantConfig {
+    private List<String> classReloadingWatchList;
+    private Set<Pattern> classReloadingAcceptClasses;
+    private Boolean classReloadingReloadConfig;
+
+    @Override
+    public Map<String, String> getAllAsStringsMap() {
+        Map<String, String> map = super.getAllAsStringsMap();
+
+        map.put(SpringConstants.SPRING_CLASS_RELOADING_WATCH_LIST, StringUtils.join(classReloadingWatchList, ','));
+        map.put(SpringConstants.SPRING_CLASS_RELOADING_ACCEPT_CLASSES, StringUtils.join(classReloadingAcceptClasses, ','));
+        map.put(SpringConstants.SPRING_CLASS_RELOADING_RELOAD_CONFIG, Objects.toString(classReloadingReloadConfig, null));
+
+        return map;
+    }
+
+    public List<String> getClassReloadingWatchList() {
+        return classReloadingWatchList;
+    }
+
+    public void setClassReloadingWatchList(List<String> classReloadingWatchList) {
+        this.classReloadingWatchList = classReloadingWatchList;
+    }
+
+    public Set<Pattern> getClassReloadingAcceptClasses() {
+        return classReloadingAcceptClasses;
+    }
+
+    public void setClassReloadingAcceptClasses(Set<Pattern> classReloadingAcceptClasses) {
+        this.classReloadingAcceptClasses = classReloadingAcceptClasses;
+    }
+
+    public Boolean getClassReloadingReloadConfig() {
+        return classReloadingReloadConfig;
+    }
+
+    public void setClassReloadingReloadConfig(Boolean classReloadingReloadConfig) {
+        this.classReloadingReloadConfig = classReloadingReloadConfig;
+    }
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Java configuration
> ------------------
>
>                 Key: WW-4875
>                 URL: https://issues.apache.org/jira/browse/WW-4875
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.5.13
>            Reporter: Aleksandr Mashchenko
>            Assignee: Aleksandr Mashchenko
>            Priority: Major
>             Fix For: 2.6
>
>
> Some people are allergic to XML and even with convention plugin currently there is no way to define properties w/o struts.xml or properties file.
> It would be great to add the ability to configure app via java configuration.
> We can start with adding support for constant, bean and unknown-handler-stack and see how it goes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message