You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2018/12/12 19:50:08 UTC

[myfaces] branch master updated: unified configs

This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b28e42  unified configs
8b28e42 is described below

commit 8b28e42979171b9efa1b22f14effe3b8124270f1
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Wed Dec 12 20:50:12 2018 +0100

    unified configs
---
 .../java/javax/faces/convert/EnumConverter.java    |   9 +
 .../myfaces/application/ResourceHandlerImpl.java   |  31 +-
 .../viewstate/SerializedViewCollection.java        |  14 +-
 .../viewstate/ServerSideStateCacheImpl.java        |   9 +-
 .../myfaces/config/FacesConfigValidator.java       |  13 -
 .../org/apache/myfaces/config/MyfacesConfig.java   | 858 +++++++++------------
 .../annotation/CdiAnnotationProviderExtension.java |   8 -
 .../annotation/DefaultAnnotationProvider.java      |  74 +-
 .../apache/myfaces/context/flash/FlashImpl.java    |   2 +-
 .../myfaces/resource/ResourceHandlerCache.java     |  33 +-
 .../TempDirFileCacheContractResourceLoader.java    |   9 +-
 .../resource/TempDirFileCacheResourceLoader.java   |   8 +-
 .../myfaces/view/facelets/ViewPoolProcessor.java   |   2 +-
 .../myfaces/webapp/AbstractFacesInitializer.java   |  10 +-
 .../myfaces/webapp/FacesInitializerFactory.java    |   2 +-
 ...tractsCreateResourceMyFacesRequestTestCase.java |   2 +-
 ...faultContractsConfigMyFacesRequestTestCase.java |   2 +-
 .../SingleContractMyFacesRequestTestCase.java      |   2 +-
 .../flow/FlowMyFacesCDIRequestTestCase.java        |   2 +-
 .../flow/FlowMyFacesRequestTestCase.java           |   2 +-
 .../FlowResourceHandlerMyFacesRequestTestCase.java |   2 +-
 .../myfaces/renderkit/HtmlRenderKitImplTest.java   |   6 +-
 .../view/facelets/compiler/TagLibraryTestCase.java |   4 +-
 .../facelets/pool/ViewPoolFaceletsTestCase.java    |   2 +-
 .../pool/ViewPoolMyFacesRequestTestCase.java       |   2 +-
 .../pss/acid/AcidMyFacesRequestTestCase.java       |   2 +-
 .../acid/AcidPssRefreshMyFacesRequestTestCase.java |   2 +-
 ...RefreshPreserveStateMyFacesRequestTestCase.java |   4 +-
 .../view/facelets/stateless/StatelessTest.java     |   2 +-
 .../BeanValidationCDIRequestTestCase.java          |   2 +-
 .../view/facelets/tag/jstl/core/CifTestCase.java   |   2 +-
 ...sComponentAnnotationMyFacesRequestTestCase.java |   2 +-
 .../UpdateHeadDynamicViewTestCase.java             |   2 +-
 33 files changed, 457 insertions(+), 669 deletions(-)

diff --git a/api/src/main/java/javax/faces/convert/EnumConverter.java b/api/src/main/java/javax/faces/convert/EnumConverter.java
index 0d50a83..febe1cf 100644
--- a/api/src/main/java/javax/faces/convert/EnumConverter.java
+++ b/api/src/main/java/javax/faces/convert/EnumConverter.java
@@ -65,6 +65,7 @@ public class EnumConverter implements Converter, PartialStateHolder
         this.targetClass = targetClass;
     }
 
+    @Override
     public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value)
         throws ConverterException
     {
@@ -103,6 +104,7 @@ public class EnumConverter implements Converter, PartialStateHolder
         throw new ConverterException(_MessageUtils.getErrorMessage(facesContext, ENUM_ID, params));
     }
 
+    @Override
     public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value)
         throws ConverterException
     {
@@ -162,6 +164,7 @@ public class EnumConverter implements Converter, PartialStateHolder
         return ""; // if empty Enum
     }
 
+    @Override
     public void restoreState(FacesContext context, Object state)
     {
         if (state != null)
@@ -170,6 +173,7 @@ public class EnumConverter implements Converter, PartialStateHolder
         }
     }
 
+    @Override
     public Object saveState(FacesContext context)
     {
         if (!initialStateMarked())
@@ -179,11 +183,13 @@ public class EnumConverter implements Converter, PartialStateHolder
         return null;
     }
 
+    @Override
     public void setTransient(boolean newTransientValue)
     {
         isTransient = newTransientValue;
     }
 
+    @Override
     public boolean isTransient()
     {
         return isTransient;
@@ -191,16 +197,19 @@ public class EnumConverter implements Converter, PartialStateHolder
     
     private boolean _initialStateMarked = false;
 
+    @Override
     public void clearInitialState()
     {
         _initialStateMarked = false;
     }
 
+    @Override
     public boolean initialStateMarked()
     {
         return _initialStateMarked;
     }
 
+    @Override
     public void markInitialState()
     {
         _initialStateMarked = true;
diff --git a/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java b/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
index eacfc3b..f0a196c 100644
--- a/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
@@ -18,7 +18,6 @@
  */
 package org.apache.myfaces.application;
 
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
 import org.apache.myfaces.renderkit.html.util.ResourceUtils;
 import org.apache.myfaces.resource.ResourceHandlerCache;
 import org.apache.myfaces.resource.ResourceHandlerCache.ResourceValue;
@@ -61,6 +60,7 @@ import java.util.stream.StreamSupport;
 import javax.faces.application.ResourceVisitOption;
 import javax.faces.application.ViewHandler;
 import javax.faces.view.ViewDeclarationLanguage;
+import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.util.SharedStringBuilder;
 import org.apache.myfaces.resource.ContractResource;
 import org.apache.myfaces.resource.ContractResourceLoader;
@@ -77,7 +77,6 @@ import org.apache.myfaces.util.SkipMatchIterator;
  */
 public class ResourceHandlerImpl extends ResourceHandler
 {
-
     private static final String IS_RESOURCE_REQUEST = "org.apache.myfaces.IS_RESOURCE_REQUEST";
 
     private ResourceHandlerSupport _resourceHandlerSupport;
@@ -86,24 +85,6 @@ public class ResourceHandlerImpl extends ResourceHandler
 
     private static final Logger log = Logger.getLogger(ResourceHandlerImpl.class.getName());
 
-    /**
-     * Allow slash in the library name of a Resource. 
-     */
-    @JSFWebConfigParam(since="2.1.6, 2.0.12", defaultValue="false", 
-            expectedValues="true, false", group="resources")
-    public static final String INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME = 
-            "org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME";
-    public static final boolean INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME_DEFAULT = false;
-    
-    /**
-     * Define the default buffer size that is used between Resource.getInputStream() and 
-     * httpServletResponse.getOutputStream() when rendering resources using the default
-     * ResourceHandler.
-     */
-    @JSFWebConfigParam(since="2.1.10, 2.0.16", defaultValue="2048", group="resources")
-    public static final String INIT_PARAM_RESOURCE_BUFFER_SIZE = "org.apache.myfaces.RESOURCE_BUFFER_SIZE";
-    public static final int INIT_PARAM_RESOURCE_BUFFER_SIZE_DEFAULT = 2048;
-    
     public static final Pattern LIBRARY_VERSION_CHECKER = Pattern.compile("\\p{Digit}+(_\\p{Digit}*)*");
     public static final Pattern RESOURCE_VERSION_CHECKER = Pattern.compile("\\p{Digit}+(_\\p{Digit}*)*\\..*");    
     
@@ -989,10 +970,7 @@ public class ResourceHandlerImpl extends ResourceHandler
     {
         if (_allowSlashLibraryName == null)
         {
-            _allowSlashLibraryName = WebConfigParamUtils.getBooleanInitParameter(
-                    FacesContext.getCurrentInstance().getExternalContext(), 
-                    INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME,
-                    INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME_DEFAULT);
+            _allowSlashLibraryName = MyfacesConfig.getCurrentInstance().isStrictJsf2AllowSlashLibraryName();
         }
         return _allowSlashLibraryName;
     }
@@ -1001,10 +979,7 @@ public class ResourceHandlerImpl extends ResourceHandler
     {
         if (_resourceBufferSize == -1)
         {
-            _resourceBufferSize = WebConfigParamUtils.getIntegerInitParameter(
-                FacesContext.getCurrentInstance().getExternalContext(),
-                INIT_PARAM_RESOURCE_BUFFER_SIZE,
-                INIT_PARAM_RESOURCE_BUFFER_SIZE_DEFAULT);
+            _resourceBufferSize = MyfacesConfig.getCurrentInstance().getResourceBufferSize();
         }
         return _resourceBufferSize;
     }
diff --git a/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java b/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
index a290ded..87695ac 100644
--- a/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
+++ b/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
@@ -39,11 +39,9 @@ class SerializedViewCollection implements Serializable
     private static final Object[] EMPTY_STATES = new Object[]{null, null};
 
     private static final long serialVersionUID = -3734849062185115847L;
-    private final List<SerializedViewKey> _keys = 
-        new ArrayList<SerializedViewKey>(
-            MyfacesConfig.INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
-    private final Map<SerializedViewKey, Object> _serializedViews = 
-        new HashMap<SerializedViewKey, Object>();
+    private final List<SerializedViewKey> _keys = new ArrayList<>(MyfacesConfig.NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
+    private final Map<SerializedViewKey, Object> _serializedViews = new HashMap<>();
+
     /**
      * The viewScopeIds can be shared between multiple entries of the same
      * view. To store it into session, the best is use two maps, one to 
@@ -55,12 +53,10 @@ class SerializedViewCollection implements Serializable
     private HashMap<SerializedViewKey, String> _viewScopeIds = null;
     private HashMap<String, Integer> _viewScopeIdCounts = null;
 
-    private final Map<SerializedViewKey, SerializedViewKey> _precedence =
-        new HashMap<SerializedViewKey, SerializedViewKey>();
+    private final Map<SerializedViewKey, SerializedViewKey> _precedence = new HashMap<>();
     private Map<String, SerializedViewKey> _lastWindowKeys = null;
 
-    public void put(FacesContext context, Object state, 
-        SerializedViewKey key, SerializedViewKey previousRestoredKey)
+    public void put(FacesContext context, Object state, SerializedViewKey key, SerializedViewKey previousRestoredKey)
     {
         put(context, state, key, previousRestoredKey, null, null);
     }
diff --git a/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java b/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
index 87946b7..b63a0a4 100644
--- a/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
@@ -70,13 +70,14 @@ class ServerSideStateCacheImpl extends StateCache<Object, Object>
     public static final String RESTORED_VIEW_KEY_REQUEST_ATTR = 
         ServerSideStateCacheImpl.class.getName() + ".RESTORED_VIEW_KEY";
     
-    public static final String NUMBER_OF_VIEWS_IN_SESSION_PARAM = MyfacesConfig.INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION;
+    public static final String NUMBER_OF_VIEWS_IN_SESSION_PARAM
+            = MyfacesConfig.NUMBER_OF_VIEWS_IN_SESSION;
 
     public static final String NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_PARAM
-            = MyfacesConfig.INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION;
-    
+            = MyfacesConfig.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION;
+
     public static final int DEFAULT_NUMBER_OF_VIEWS_IN_SESSION = 
-            MyfacesConfig.INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
+            MyfacesConfig.NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
 
     /**
      * Indicates that the serialized state will be compressed before it is written to the session. By default true.
diff --git a/impl/src/main/java/org/apache/myfaces/config/FacesConfigValidator.java b/impl/src/main/java/org/apache/myfaces/config/FacesConfigValidator.java
index 2dd1414..b1b9771 100644
--- a/impl/src/main/java/org/apache/myfaces/config/FacesConfigValidator.java
+++ b/impl/src/main/java/org/apache/myfaces/config/FacesConfigValidator.java
@@ -26,22 +26,11 @@ import java.util.List;
 
 import javax.faces.context.ExternalContext;
 
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
 import org.apache.myfaces.config.element.NavigationCase;
 import org.apache.myfaces.config.element.NavigationRule;
 
 public class FacesConfigValidator
 {
-
-    /**
-     * Validate if the managed beans and navigations rules are correct.
-     * 
-     * <p>For example, it checks if the managed bean classes really exists, or if the 
-     * navigation rules points to existing view files.</p>
-     */
-    @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false")
-    public static final String VALIDATE_CONTEXT_PARAM = "org.apache.myfaces.VALIDATE";
-    
     private FacesConfigValidator()
     {
         // hidden 
@@ -49,13 +38,11 @@ public class FacesConfigValidator
 
     public static List<String> validate(ExternalContext ctx)
     {
-        
         RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(ctx);
         
         Collection<? extends NavigationRule> navRules = runtimeConfig.getNavigationRules();
         
         return validate(navRules, ctx);
-        
     }
     
     public static List<String> validate(Collection<? extends NavigationRule> navRules, ExternalContext ctx)
diff --git a/impl/src/main/java/org/apache/myfaces/config/MyfacesConfig.java b/impl/src/main/java/org/apache/myfaces/config/MyfacesConfig.java
index 2ffe907..8e053c1 100755
--- a/impl/src/main/java/org/apache/myfaces/config/MyfacesConfig.java
+++ b/impl/src/main/java/org/apache/myfaces/config/MyfacesConfig.java
@@ -18,14 +18,13 @@
  */
 package org.apache.myfaces.config;
 
-
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
 
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.WebConfigParamUtils;
 
 /**
  * Holds all configuration init parameters (from web.xml) that are independent
@@ -50,8 +49,8 @@ public class MyfacesConfig
      * This param is valid only if project stage is not production. Set this param to 0 disable this feature.
      */
     @JSFWebConfigParam(defaultValue="2",since="1.1", classType="java.lang.Long")
-    public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD = "org.apache.myfaces.CONFIG_REFRESH_PERIOD";
-    public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT = 2;
+    public static final String CONFIG_REFRESH_PERIOD = "org.apache.myfaces.CONFIG_REFRESH_PERIOD";
+    public static final long CONFIG_REFRESH_PERIOD_DEFAULT = 2;
 
     /**
      * Define if the input field that should store the state (javax.faces.ViewState) should render 
@@ -70,8 +69,8 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1", 
             ignoreUpperLowerCase=true, group="state")
-    private static final String  INIT_PARAM_RENDER_VIEWSTATE_ID = "org.apache.myfaces.RENDER_VIEWSTATE_ID";
-    private static final boolean INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT = true;
+    private static final String  RENDER_VIEWSTATE_ID = "org.apache.myfaces.RENDER_VIEWSTATE_ID";
+    private static final boolean RENDER_VIEWSTATE_ID_DEFAULT = true;
 
     /**
      * Use "&amp;amp;" entity instead a plain "&amp;" character within HTML.
@@ -90,8 +89,8 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1.6", 
             ignoreUpperLowerCase=true, group="render")
-    private static final String  INIT_PARAM_STRICT_XHTML_LINKS = "org.apache.myfaces.STRICT_XHTML_LINKS";
-    private static final boolean INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT = true;
+    private static final String  STRICT_XHTML_LINKS = "org.apache.myfaces.STRICT_XHTML_LINKS";
+    private static final boolean STRICT_XHTML_LINKS_DEFAULT = true;
     
     /**
      * This param renders the clear javascript on button necessary only for
@@ -101,9 +100,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.3",
             ignoreUpperLowerCase=true, group="render")
-    private static final String INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON = 
+    private static final String RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON = 
         "org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON";
-    private static final boolean INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT= false;
+    private static final boolean RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT= false;
 
     /**
      * Define an alternate class name that will be used to initialize MyFaces, instead the default 
@@ -114,7 +113,7 @@ public class MyfacesConfig
      * </p>
      */
     @JSFWebConfigParam(since="1.2.7")
-    private static final String INIT_PARAM_DELEGATE_FACES_SERVLET = "org.apache.myfaces.DELEGATE_FACES_SERVLET";
+    private static final String DELEGATE_FACES_SERVLET = "org.apache.myfaces.DELEGATE_FACES_SERVLET";
 
     /**
      * Indicate if the facelet associated to the view should be reapplied when the view is refreshed.
@@ -129,9 +128,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since="2.0", defaultValue="auto", expectedValues="true,false,auto", tags="performance", 
             ignoreUpperLowerCase=true, group="state")
-    public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS = 
+    public final static String REFRESH_TRANSIENT_BUILD_ON_PSS = 
         "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS"; 
-    public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT = "auto";
+    public final static String REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT = "auto";
 
     /**
      * Enable or disable a special mode that enable full state for parent components containing c:if, c:forEach, 
@@ -144,35 +143,35 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false, on, off, yes, no", 
             tags="performance", ignoreUpperLowerCase=true, group="state")
-    public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE = 
+    public final static String REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE = 
         "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE";
-    public final static boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT = false;
+    public final static boolean REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT = false;
     
     /**
      * If set to <code>true</code>, tag library XML files and faces config XML files using schema 
      * will be validated during application start up
      */
     @JSFWebConfigParam(since="2.0", expectedValues="true, false, on, off, yes, no", ignoreUpperLowerCase=true)
-    public final static String INIT_PARAM_VALIDATE_XML = "org.apache.myfaces.VALIDATE_XML";
-    public final static boolean INIT_PARAM_VALIDATE_XML_DEFAULT = false;
+    public final static String VALIDATE_XML = "org.apache.myfaces.VALIDATE_XML";
+    public final static boolean VALIDATE_XML_DEFAULT = false;
     
     /**
      * Wrap content inside script with xml comment to prevent old browsers to display it. By default it is true. 
      */
     @JSFWebConfigParam(since="2.0.1", expectedValues="true, false, on, off, yes, no", defaultValue="false",
             ignoreUpperLowerCase=true, group="render")
-    public final static String INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG = 
+    public final static String WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG = 
         "org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG";
-    public final static boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT = false;
+    public final static boolean WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT = false;
     
     /**
      * If set true, render the form submit script inline, as in myfaces core 1.2 and earlier versions 
      */
     @JSFWebConfigParam(since="2.0.2", expectedValues="true, false, on, off, yes, no", defaultValue="false", 
             ignoreUpperLowerCase=true, group="render")
-    public final static String INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE = 
+    public final static String RENDER_FORM_SUBMIT_SCRIPT_INLINE = 
         "org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE";
-    public final static boolean INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT = false;
+    public final static boolean RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT = false;
     
     /**
      * Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder 
@@ -182,8 +181,8 @@ public class MyfacesConfig
      * This param only has effect when project stage is Development.     
      */
     @JSFWebConfigParam(since="2.0.8")
-    public final static String INIT_PARAM_DEBUG_PHASE_LISTENER = "org.apache.myfaces.DEBUG_PHASE_LISTENER";
-    public final static boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT = false;
+    public final static String DEBUG_PHASE_LISTENER = "org.apache.myfaces.DEBUG_PHASE_LISTENER";
+    public final static boolean DEBUG_PHASE_LISTENER_DEFAULT = false;
     
     /**
      * Change default getType() behavior for composite component EL resolver, from return null 
@@ -196,9 +195,9 @@ public class MyfacesConfig
      * so the change is enabled by default). 
      */
     @JSFWebConfigParam(since="2.0.10", expectedValues="true, false", defaultValue="false", group="EL")
-    public final static String INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER = 
+    public final static String STRICT_JSF_2_CC_EL_RESOLVER = 
         "org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER";
-    public final static boolean INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT = false;
+    public final static boolean STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT = false;
     
     /**
      * Define the default content type that the default ResponseWriter generates, when no match can be derived from
@@ -206,9 +205,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since="2.0.11,2.1.5", expectedValues="text/html, application/xhtml+xml", 
             defaultValue="text/html", group="render")
-    public final static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE = 
+    public final static String DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE = 
         "org.apache.myfaces.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE";
-    public final static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT = "text/html";
+    public final static String DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT = "text/html";
 
     /**
      * Enable or disable a cache used to "remember" the generated facelets unique ids and reduce 
@@ -218,9 +217,9 @@ public class MyfacesConfig
             group="viewhandler", tags="performance",
             desc="Enable or disable a cache used to 'remember'  the generated facelets unique ids " + 
                  "and reduce the impact over memory usage.")
-    public static final String INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED = 
+    public static final String VIEW_UNIQUE_IDS_CACHE_ENABLED = 
         "org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED";
-    public static final boolean INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT = true;
+    public static final boolean VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT = true;
     
     /**
      * Set the size of the cache used to store strings generated using SectionUniqueIdCounter
@@ -228,9 +227,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(defaultValue = "100", since = "2.0.13, 2.1.7",
             group="viewhandler", tags="performance")
-    public static final String INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE =
+    public static final String COMPONENT_UNIQUE_IDS_CACHE_SIZE =
         "org.apache.myfaces.COMPONENT_UNIQUE_IDS_CACHE_SIZE";
-    public static final int INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT = 100;
+    public static final int COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT = 100;
 
     /**
     * If set false, myfaces won't support JSP and javax.faces.el. JSP are deprecated in JSF 2.X, javax.faces.el in 
@@ -243,8 +242,8 @@ public class MyfacesConfig
          desc="If set false, myfaces won't support JSP and javax.faces.el. JSP are deprecated in " +
          "JSF 2.X, javax.faces.el in in JSF 1.2. Default value is true.",
          group="EL", tags="performance ")
-    public final static String INIT_PARAM_SUPPORT_JSP_AND_FACES_EL = "org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL";
-    public final static boolean INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT = true;
+    public final static String SUPPORT_JSP_AND_FACES_EL = "org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL";
+    public final static boolean SUPPORT_JSP_AND_FACES_EL_DEFAULT = true;
     
     /**
      * When the application runs inside Google Application Engine container (GAE),
@@ -255,8 +254,8 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since = "2.1.8, 2.0.14", expectedValues="none, myfavoritejsflib-*.jar",
             tags="performance, GAE")
-    public static final String INIT_PARAM_GAE_JSF_JAR_FILES = "org.apache.myfaces.GAE_JSF_JAR_FILES";
-    public final static String INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT = null;
+    public static final String GAE_JSF_JAR_FILES = "org.apache.myfaces.GAE_JSF_JAR_FILES";
+    public final static String GAE_JSF_JAR_FILES_DEFAULT = null;
 
     /**
      * When the application runs inside Google Application Engine container (GAE),
@@ -270,9 +269,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since = "2.1.8, 2.0.14", expectedValues="none, myfavoritejsflib-*.jar",
             tags="performance, GAE")
-    public static final String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES = 
+    public static final String GAE_JSF_ANNOTATIONS_JAR_FILES = 
             "org.apache.myfaces.GAE_JSF_ANNOTATIONS_JAR_FILES";
-    public final static String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT = null;
+    public final static String GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT = null;
     
     /**
      * If this param is set to true, a check will be done in Restore View Phase to check
@@ -283,17 +282,17 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since = "2.1.13", defaultValue="false", expectedValues="true,false", 
             group="viewhandler")
-    public static final String INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND = 
+    public static final String STRICT_JSF_2_VIEW_NOT_FOUND = 
             "org.apache.myfaces.STRICT_JSF_2_VIEW_NOT_FOUND";
-    public final static boolean INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT = false;
+    public final static boolean STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT = false;
 
     @JSFWebConfigParam(defaultValue = "false", since = "2.2.0", expectedValues="true, false", group="render",
             tags="performance",
             desc="Enable or disable an early flush which allows to send e.g. the HTML-Head to the client " +
                     "while the rest gets rendered. It's a well known technique to reduce the time for loading a page.")
-    private static final String INIT_PARAM_EARLY_FLUSH_ENABLED =
+    private static final String EARLY_FLUSH_ENABLED =
         "org.apache.myfaces.EARLY_FLUSH_ENABLED";
-    private static final boolean INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT = false;
+    private static final boolean EARLY_FLUSH_ENABLED_DEFAULT = false;
     
     /**
      * This param makes components like c:set, ui:param and templating components like ui:decorate,
@@ -302,9 +301,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since = "2.2.0", defaultValue="false", expectedValues="true,false", 
             group="viewhandler")
-    public static final String INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY = 
+    public static final String STRICT_JSF_2_FACELETS_COMPATIBILITY = 
             "org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY";
-    public final static boolean INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT = false;    
+    public final static boolean STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT = false;    
     
     /**
      * This param makes h:form component to render the view state and other hidden fields
@@ -313,9 +312,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since = "2.2.4", defaultValue = "false", expectedValues = "true,false",
             group="render")
-    public static final String INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN =
+    public static final String RENDER_FORM_VIEW_STATE_AT_BEGIN =
             "org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN";
-    public final static boolean INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT = false;
+    public final static boolean RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT = false;
     
     /**
      * Defines whether flash scope is disabled, preventing add the Flash cookie to the response. 
@@ -323,8 +322,8 @@ public class MyfacesConfig
      * <p>This is useful for applications that does not require to use flash scope, and instead uses other scopes.</p>
      */
     @JSFWebConfigParam(defaultValue="false",since="2.0.5")
-    public static final String INIT_PARAM_FLASH_SCOPE_DISABLED = "org.apache.myfaces.FLASH_SCOPE_DISABLED";
-    public static final boolean INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT = false;
+    public static final String FLASH_SCOPE_DISABLED = "org.apache.myfaces.FLASH_SCOPE_DISABLED";
+    public static final boolean FLASH_SCOPE_DISABLED_DEFAULT = false;
     
     /**
      * Defines the amount (default = 20) of the latest views are stored in session.
@@ -334,12 +333,11 @@ public class MyfacesConfig
      * 
      */
     @JSFWebConfigParam(defaultValue="20",since="1.1", classType="java.lang.Integer", group="state", tags="performance")
-    public static final String INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION = "org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION";
-
+    public static final String NUMBER_OF_VIEWS_IN_SESSION = "org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION";
     /**
      * Default value for <code>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</code> context parameter.
      */
-    public static final int INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT = 20;    
+    public static final int NUMBER_OF_VIEWS_IN_SESSION_DEFAULT = 20;    
 
     /**
      * Indicates the amount of views (default is not active) that should be stored in session between sequential
@@ -356,9 +354,9 @@ public class MyfacesConfig
      */
     @JSFWebConfigParam(since="2.0.6", classType="java.lang.Integer", group="state", tags="performance", 
             defaultValue = "4")
-    public static final String INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
+    public static final String NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
             = "org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION";
-    public static final Integer INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT = 4;
+    public static final Integer NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT = 4;
     
     /**
      * Indicate the max number of flash tokens stored into session. It is only active when 
@@ -370,7 +368,7 @@ public class MyfacesConfig
      * org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION) + 1 = 6.
      */
     @JSFWebConfigParam(since="2.2.6", group="state", tags="performance")
-    static final String INIT_PARAM_NUMBER_OF_FLASH_TOKENS_IN_SESSION = 
+    static final String NUMBER_OF_FLASH_TOKENS_IN_SESSION = 
             "org.apache.myfaces.NUMBER_OF_FLASH_TOKENS_IN_SESSION";
     
     /**
@@ -384,7 +382,7 @@ public class MyfacesConfig
      * org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION) + 1 = 6.
      */
     @JSFWebConfigParam(since="2.2.6", group="state", tags="performance")
-    static final String INIT_PARAM_NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION = 
+    static final String NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION = 
             "org.apache.myfaces.FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION";
     
     /**
@@ -402,36 +400,108 @@ public class MyfacesConfig
             "org.apache.myfaces.STRICT_JSF_2_ORIGIN_HEADER_APP_PATH";
     public final static boolean STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT = false;
 
-    private long _configRefreshPeriod;
-    private boolean _renderViewStateId;
-    private boolean _strictXhtmlLinks;
-    private boolean _renderClearJavascriptOnButton;
-    private String _delegateFacesServlet;
-    private boolean _refreshTransientBuildOnPSS;
-    private boolean _refreshTransientBuildOnPSSAuto;
-    private boolean refreshTransientBuildOnPSSPreserveState;
-    private boolean _validateXML;
-    private boolean _wrapScriptContentWithXmlCommentTag;
-    private boolean _renderFormSubmitScriptInline;
-    private boolean _debugPhaseListenerEnabled;
-    private boolean _strictJsf2CCELResolver;
-    private String _defaultResponseWriterContentTypeMode;
-    private boolean _viewUniqueIdsCacheEnabled;
-    private int _componentUniqueIdsCacheSize;
-    private boolean _supportJSPAndFacesEL;
-    private String _gaeJsfJarFiles;
-    private String _gaeJsfAnnotationsJarFiles;
-    private boolean _strictJsf2ViewNotFound;
-    private boolean _earlyFlushEnabled;
-    private boolean _strictJsf2FaceletsCompatibility;
-    private boolean _renderFormViewStateAtBegin;
-    private boolean _flashScopeDisabled;
-    private Integer _numberOfViewsInSession;
-    private Integer _numberOfSequentialViewsInSession;
-    private Integer _numberOfFlashTokensInSession;
-    private Integer _numberOfFacesFlowClientWindowIdsInSession;
-    private boolean _supportEL3ImportHandler;
-    private boolean _strictJsf2OriginHeaderAppPath;
+    /**
+     * Allow slash in the library name of a Resource. 
+     */
+    @JSFWebConfigParam(since="2.1.6, 2.0.12", defaultValue="false", 
+            expectedValues="true, false", group="resources")
+    public static final String STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME = 
+            "org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME";
+    public static final boolean STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME_DEFAULT = false;
+    
+    /**
+     * Define the default buffer size that is used between Resource.getInputStream() and 
+     * httpServletResponse.getOutputStream() when rendering resources using the default
+     * ResourceHandler.
+     */
+    @JSFWebConfigParam(since="2.1.10, 2.0.16", defaultValue="2048", group="resources")
+    public static final String RESOURCE_BUFFER_SIZE = "org.apache.myfaces.RESOURCE_BUFFER_SIZE";
+    public static final int RESOURCE_BUFFER_SIZE_DEFAULT = 2048;
+    
+    /**
+     * Validate if the managed beans and navigations rules are correct.
+     * 
+     * <p>For example, it checks if the managed bean classes really exists, or if the 
+     * navigation rules points to existing view files.</p>
+     */
+    @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false")
+    public static final String VALIDATE = "org.apache.myfaces.VALIDATE";
+    
+    /**
+     * Defines if CDI should be used for annotation scanning to improve the startup performance.
+     */
+    @JSFWebConfigParam(since="2.2.9", tags = "performance", defaultValue = "false")
+    public static final String USE_CDI_FOR_ANNOTATION_SCANNING
+            = "org.apache.myfaces.annotation.USE_CDI_FOR_ANNOTATION_SCANNING";
+    public static final boolean USE_CDI_FOR_ANNOTATION_SCANNING_DEFAULT = false;
+    
+    
+    /**
+     * Controls the size of the cache used to check if a resource exists or not. 
+     * 
+     * <p>See org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED for details.</p>
+     */
+    @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="resources", 
+            classType="java.lang.Integer", tags="performance")
+    private static final String RESOURCE_HANDLER_CACHE_SIZE = 
+        "org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE";
+    private static final int RESOURCE_HANDLER_CACHE_SIZE_DEFAULT = 500;
+
+    /**
+     * Enable or disable the cache used to "remember" if a resource handled by 
+     * the default ResourceHandler exists or not.
+     * 
+     */
+    @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", group="resources", 
+            expectedValues="true,false", tags="performance")
+    private static final String RESOURCE_HANDLER_CACHE_ENABLED = 
+        "org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED";
+    private static final boolean RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT = true;
+
+    
+    /**
+     * Servlet context init parameter which defines which packages to scan
+     * for beans, separated by commas.
+     */
+    @JSFWebConfigParam(since="2.0")
+    public static final String SCAN_PACKAGES = "org.apache.myfaces.annotation.SCAN_PACKAGES";
+    
+    private boolean strictJsf2AllowSlashLibraryName;
+    private long configRefreshPeriod = CONFIG_REFRESH_PERIOD_DEFAULT;
+    private boolean renderViewStateId = RENDER_VIEWSTATE_ID_DEFAULT;
+    private boolean strictXhtmlLinks = STRICT_XHTML_LINKS_DEFAULT;
+    private boolean renderClearJavascriptOnButton = RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT;
+    private String delegateFacesServlet;
+    private boolean refreshTransientBuildOnPSS = true;
+    private boolean refreshTransientBuildOnPSSAuto = true;
+    private boolean refreshTransientBuildOnPSSPreserveState = REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT;
+    private boolean validateXML = VALIDATE_XML_DEFAULT;
+    private boolean wrapScriptContentWithXmlCommentTag = WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT;
+    private boolean renderFormSubmitScriptInline = RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT;
+    private boolean debugPhaseListenerEnabled = DEBUG_PHASE_LISTENER_DEFAULT;
+    private boolean strictJsf2CCELResolver = STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT;
+    private String defaultResponseWriterContentTypeMode = DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT;
+    private boolean viewUniqueIdsCacheEnabled = VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT;
+    private int componentUniqueIdsCacheSize = COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT;
+    private boolean supportJSPAndFacesEL = SUPPORT_JSP_AND_FACES_EL_DEFAULT;
+    private String gaeJsfJarFiles = GAE_JSF_JAR_FILES_DEFAULT;
+    private String gaeJsfAnnotationsJarFiles = GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT;
+    private boolean strictJsf2ViewNotFound = STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT;
+    private boolean earlyFlushEnabled = EARLY_FLUSH_ENABLED_DEFAULT;
+    private boolean strictJsf2FaceletsCompatibility = STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT;
+    private boolean renderFormViewStateAtBegin = RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT;
+    private boolean flashScopeDisabled = FLASH_SCOPE_DISABLED_DEFAULT;
+    private Integer numberOfViewsInSession = NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
+    private Integer numberOfSequentialViewsInSession = NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT;
+    private Integer numberOfFlashTokensInSession;
+    private Integer numberOfFacesFlowClientWindowIdsInSession;
+    private boolean supportEL3ImportHandler = SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT;
+    private boolean strictJsf2OriginHeaderAppPath = STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT;
+    private int resourceBufferSize = RESOURCE_BUFFER_SIZE_DEFAULT;
+    private boolean useCdiForAnnotationScanning = USE_CDI_FOR_ANNOTATION_SCANNING_DEFAULT;
+    private boolean resourceHandlerCacheEnabled = RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT;
+    private int resourceHandlerCacheSize = RESOURCE_HANDLER_CACHE_SIZE_DEFAULT;
+    private String scanPackages;
 
     private static final boolean MYFACES_IMPL_AVAILABLE;
     private static final boolean RI_IMPL_AVAILABLE;
@@ -449,10 +519,7 @@ public class MyfacesConfig
             myfacesImplAvailable = false;
         }
         MYFACES_IMPL_AVAILABLE = myfacesImplAvailable;
-    }
-
-    static
-    {
+        
         boolean riImplAvailable;
         try
         {
@@ -466,17 +533,18 @@ public class MyfacesConfig
         RI_IMPL_AVAILABLE = riImplAvailable;
     }
 
+    public static MyfacesConfig getCurrentInstance()
+    {
+        return getCurrentInstance(FacesContext.getCurrentInstance().getExternalContext());
+    }
+    
     public static MyfacesConfig getCurrentInstance(ExternalContext extCtx)
     {
-        MyfacesConfig myfacesConfig = (MyfacesConfig) extCtx
-                .getApplicationMap().get(APPLICATION_MAP_PARAM_NAME);
+        MyfacesConfig myfacesConfig = (MyfacesConfig) extCtx.getApplicationMap().get(APPLICATION_MAP_PARAM_NAME);
         if (myfacesConfig == null)
         {
-
             myfacesConfig = createAndInitializeMyFacesConfig(extCtx);
-
             extCtx.getApplicationMap().put(APPLICATION_MAP_PARAM_NAME, myfacesConfig);
-
         }
 
         return myfacesConfig;
@@ -484,36 +552,8 @@ public class MyfacesConfig
     
     public MyfacesConfig()
     {
-        setRenderClearJavascriptOnButton(INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT);
-        setRenderViewStateId(INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT);
-        setStrictXhtmlLinks(INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT);
-        setConfigRefreshPeriod(INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT);
-        setRefreshTransientBuildOnPSS(true);
-        setRefreshTransientBuildOnPSSAuto(true);
-        setRefreshTransientBuildOnPSSPreserveState(INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT);
-        setValidateXML(INIT_PARAM_VALIDATE_XML_DEFAULT);
-        setWrapScriptContentWithXmlCommentTag(INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT);
-        setRenderFormSubmitScriptInline(INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT);
-        setDebugPhaseListenerEnabled(INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT);
-        setStrictJsf2CCELResolver(INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT);
-        setDefaultResponseWriterContentTypeMode(INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT);
-        setViewUniqueIdsCacheEnabled(INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT);
-        setComponentUniqueIdsCacheSize(INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT);
-        setSupportJSPAndFacesEL(INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT);
-        setGaeJsfJarFiles(INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT);
-        setGaeJsfAnnotationsJarFiles(INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT);
-        setStrictJsf2ViewNotFound(INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT);
-        setEarlyFlushEnabled(INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT);
-        setStrictJsf2FaceletsCompatibility(INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT);
-        setRenderFormViewStateAtBegin(INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT);
-        setFlashScopeDisabled(INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT);
-        setNumberOfViewsInSession(INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
-        setNumberOfSequentialViewsInSession(INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
-        setNumberOfFlashTokensInSession(
-                (INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT / 
-                        INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT)+1);
-        setSupportEL3ImportHandler(SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT);
-        setStrictJsf2OriginHeaderAppPath(STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT);
+        numberOfFlashTokensInSession = (NUMBER_OF_VIEWS_IN_SESSION_DEFAULT
+                / NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT) + 1;
     }
 
     private static MyfacesConfig createAndInitializeMyFacesConfig(ExternalContext extCtx)
@@ -521,178 +561,215 @@ public class MyfacesConfig
         
         MyfacesConfig myfacesConfig = new MyfacesConfig();
 
-        myfacesConfig.setRenderClearJavascriptOnButton(getBooleanInitParameter(extCtx, 
-                                                            INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON,
-                                                            INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT));
-
-        myfacesConfig.setRenderViewStateId(getBooleanInitParameter(extCtx, INIT_PARAM_RENDER_VIEWSTATE_ID,
-                                                                   INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT));
-        myfacesConfig.setStrictXhtmlLinks(getBooleanInitParameter(extCtx, INIT_PARAM_STRICT_XHTML_LINKS,
-                                                                  INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT));
-        myfacesConfig.setRenderFormSubmitScriptInline(getBooleanInitParameter(extCtx,
-                                                                  INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE,
-                                                                  INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT));
+        myfacesConfig.renderClearJavascriptOnButton = getBooleanInitParameter(extCtx,
+                RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON,
+                RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT);
+
+        myfacesConfig.renderViewStateId = getBooleanInitParameter(extCtx,
+                RENDER_VIEWSTATE_ID,
+                RENDER_VIEWSTATE_ID_DEFAULT);
+        
+        myfacesConfig.strictXhtmlLinks = getBooleanInitParameter(extCtx,
+                STRICT_XHTML_LINKS,
+                STRICT_XHTML_LINKS_DEFAULT);
+
+        myfacesConfig.renderFormSubmitScriptInline = getBooleanInitParameter(extCtx,
+                RENDER_FORM_SUBMIT_SCRIPT_INLINE,
+                RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT);
         
-        myfacesConfig.setConfigRefreshPeriod(getLongInitParameter(extCtx, INIT_PARAM_CONFIG_REFRESH_PERIOD,
-                INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT));
+        myfacesConfig.configRefreshPeriod = getLongInitParameter(extCtx,
+                CONFIG_REFRESH_PERIOD,
+                CONFIG_REFRESH_PERIOD_DEFAULT);
 
-        myfacesConfig.setDelegateFacesServlet(extCtx.getInitParameter(INIT_PARAM_DELEGATE_FACES_SERVLET));
+        myfacesConfig.delegateFacesServlet = extCtx.getInitParameter(DELEGATE_FACES_SERVLET);
         
         String refreshTransientBuildOnPSS = getStringInitParameter(extCtx, 
-                INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, 
-                INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT);
+                REFRESH_TRANSIENT_BUILD_ON_PSS, 
+                REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT);
         
         if (refreshTransientBuildOnPSS == null)
         {
-            myfacesConfig.setRefreshTransientBuildOnPSS(false);
-            myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
+            myfacesConfig.refreshTransientBuildOnPSS = false;
+            myfacesConfig.refreshTransientBuildOnPSSAuto = false;
         }
         else if ("auto".equalsIgnoreCase(refreshTransientBuildOnPSS))
         {
-            myfacesConfig.setRefreshTransientBuildOnPSS(true);
-            myfacesConfig.setRefreshTransientBuildOnPSSAuto(true);
+            myfacesConfig.refreshTransientBuildOnPSS = true;
+            myfacesConfig.refreshTransientBuildOnPSSAuto = true;
         }
         else if (refreshTransientBuildOnPSS.equalsIgnoreCase("true") || 
                 refreshTransientBuildOnPSS.equalsIgnoreCase("on") || 
                 refreshTransientBuildOnPSS.equalsIgnoreCase("yes"))
         {
-            myfacesConfig.setRefreshTransientBuildOnPSS(true);
-            myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
+            myfacesConfig.refreshTransientBuildOnPSS = true;
+            myfacesConfig.refreshTransientBuildOnPSSAuto = false;
         }
         else
         {
-            myfacesConfig.setRefreshTransientBuildOnPSS(false);
-            myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
+            myfacesConfig.refreshTransientBuildOnPSS = false;
+            myfacesConfig.refreshTransientBuildOnPSSAuto = false;
         }
         
-        myfacesConfig.setRefreshTransientBuildOnPSSPreserveState(getBooleanInitParameter(extCtx,
-                INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE, 
-                INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT));
+        myfacesConfig.refreshTransientBuildOnPSSPreserveState = getBooleanInitParameter(extCtx,
+                REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE, 
+                REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT);
         
-        myfacesConfig.setValidateXML(getBooleanInitParameter(extCtx, INIT_PARAM_VALIDATE_XML, 
-                INIT_PARAM_VALIDATE_XML_DEFAULT));
+        myfacesConfig.validateXML = getBooleanInitParameter(extCtx,
+                VALIDATE_XML, 
+                VALIDATE_XML_DEFAULT);
         
-        myfacesConfig.setWrapScriptContentWithXmlCommentTag(getBooleanInitParameter(extCtx, 
-                INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG, 
-                INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT));
+        myfacesConfig.wrapScriptContentWithXmlCommentTag = getBooleanInitParameter(extCtx, 
+                WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG, 
+                WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT);
         
-        myfacesConfig.setDebugPhaseListenerEnabled(getBooleanInitParameter(extCtx, INIT_PARAM_DEBUG_PHASE_LISTENER,
-                INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT));
+        myfacesConfig.debugPhaseListenerEnabled = getBooleanInitParameter(extCtx,
+                DEBUG_PHASE_LISTENER,
+                DEBUG_PHASE_LISTENER_DEFAULT);
                 
-        myfacesConfig.setStrictJsf2CCELResolver(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER, INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT));
+        myfacesConfig.strictJsf2CCELResolver = getBooleanInitParameter(extCtx, 
+                STRICT_JSF_2_CC_EL_RESOLVER,
+                STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT);
         
-        myfacesConfig.setDefaultResponseWriterContentTypeMode(WebConfigParamUtils.getStringInitParameter(
-                extCtx, INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE,
-                INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT));
-
-        myfacesConfig.setViewUniqueIdsCacheEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED, INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT));
-        myfacesConfig.setComponentUniqueIdsCacheSize(
-                WebConfigParamUtils.getIntegerInitParameter(extCtx,
-                INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE, 
-                INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT));
-        myfacesConfig.setSupportJSPAndFacesEL(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                INIT_PARAM_SUPPORT_JSP_AND_FACES_EL, INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT));
-                
-        myfacesConfig.setGaeJsfJarFiles(WebConfigParamUtils.getStringInitParameter(extCtx, 
-                INIT_PARAM_GAE_JSF_JAR_FILES, INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT));
-        myfacesConfig.setGaeJsfAnnotationsJarFiles(WebConfigParamUtils.getStringInitParameter(extCtx, 
-                INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES, INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT));
+        myfacesConfig.defaultResponseWriterContentTypeMode = getStringInitParameter(extCtx, 
+                DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE,
+                DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT);
+
+        myfacesConfig.viewUniqueIdsCacheEnabled = getBooleanInitParameter(extCtx, 
+                VIEW_UNIQUE_IDS_CACHE_ENABLED,
+                VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT);
 
-        myfacesConfig.setStrictJsf2ViewNotFound(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND, INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT));
+        myfacesConfig.componentUniqueIdsCacheSize = getIntegerInitParameter(extCtx,
+                COMPONENT_UNIQUE_IDS_CACHE_SIZE, 
+                COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT);
+        
+        myfacesConfig.supportJSPAndFacesEL = getBooleanInitParameter(extCtx, 
+                SUPPORT_JSP_AND_FACES_EL,
+                SUPPORT_JSP_AND_FACES_EL_DEFAULT);
+                
+        myfacesConfig.gaeJsfJarFiles = getStringInitParameter(extCtx, 
+                GAE_JSF_JAR_FILES,
+                GAE_JSF_JAR_FILES_DEFAULT);
         
-        myfacesConfig.setEarlyFlushEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
-                INIT_PARAM_EARLY_FLUSH_ENABLED, INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT));
+        myfacesConfig.gaeJsfAnnotationsJarFiles = getStringInitParameter(extCtx, 
+                GAE_JSF_ANNOTATIONS_JAR_FILES,
+                GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT);
 
+        myfacesConfig.strictJsf2ViewNotFound = getBooleanInitParameter(extCtx, 
+                STRICT_JSF_2_VIEW_NOT_FOUND,
+                STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT);
+        
+        myfacesConfig.earlyFlushEnabled = getBooleanInitParameter(extCtx,
+                EARLY_FLUSH_ENABLED,
+                EARLY_FLUSH_ENABLED_DEFAULT);
 
-        myfacesConfig.setStrictJsf2FaceletsCompatibility(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY, 
-                INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT));
+        myfacesConfig.strictJsf2FaceletsCompatibility = getBooleanInitParameter(extCtx, 
+                STRICT_JSF_2_FACELETS_COMPATIBILITY, 
+                STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT);
+        
+        myfacesConfig.renderFormViewStateAtBegin = getBooleanInitParameter(extCtx,
+                RENDER_FORM_VIEW_STATE_AT_BEGIN,
+                RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT);
         
-        myfacesConfig.setRenderFormViewStateAtBegin(WebConfigParamUtils.getBooleanInitParameter(extCtx,
-                INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN,
-                INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT));
+        myfacesConfig.flashScopeDisabled = getBooleanInitParameter(extCtx,
+                FLASH_SCOPE_DISABLED,
+                FLASH_SCOPE_DISABLED_DEFAULT);
         
-        myfacesConfig.setFlashScopeDisabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
-                INIT_PARAM_FLASH_SCOPE_DISABLED,
-                INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT));
+        myfacesConfig.strictJsf2AllowSlashLibraryName = getBooleanInitParameter(extCtx, 
+                    STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME,
+                    STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME_DEFAULT);
         
         try
         {
-            myfacesConfig.setNumberOfSequentialViewsInSession(WebConfigParamUtils.getIntegerInitParameter(
-                    extCtx, 
-                    INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION,
-                    INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT));
+            myfacesConfig.numberOfSequentialViewsInSession = getIntegerInitParameter(extCtx, 
+                    NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION,
+                    NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
             Integer views = myfacesConfig.getNumberOfSequentialViewsInSession();
             if (views == null || views < 0)
             {
                 Logger.getLogger(MyfacesConfig.class.getName()).severe(
-                        "Configured value for " + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
+                        "Configured value for " + NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
                           + " is not valid, must be an value >= 0, using default value ("
-                          + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
-                views = INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT;
+                          + NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
+                views = NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT;
             }
         }
         catch (Throwable e)
         {
             Logger.getLogger(MyfacesConfig.class.getName()).log(Level.SEVERE, "Error determining the value for "
-                   + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
+                   + NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
                    + ", expected an integer value > 0, using default value ("
-                   + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
+                   + NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
         }        
         try
         {
-            myfacesConfig.setNumberOfViewsInSession(WebConfigParamUtils.getIntegerInitParameter(
-                        extCtx, 
-                        INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION,
-                        INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT));
-            Integer views = myfacesConfig.getNumberOfViewsInSession();
-            if (views == null || views <= 0)
+            myfacesConfig.numberOfViewsInSession = getIntegerInitParameter(extCtx, 
+                    NUMBER_OF_VIEWS_IN_SESSION,
+                    NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
+            if (myfacesConfig.numberOfViewsInSession == null || myfacesConfig.numberOfViewsInSession <= 0)
             {
                 Logger.getLogger(MyfacesConfig.class.getName()).severe(
-                        "Configured value for " + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION
+                        "Configured value for " + NUMBER_OF_VIEWS_IN_SESSION
                           + " is not valid, must be an value > 0, using default value ("
-                          + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
-                views = INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
+                          + NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
+                myfacesConfig.numberOfViewsInSession = NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
             }
         }
         catch (Throwable e)
         {
             Logger.getLogger(MyfacesConfig.class.getName()).log(Level.SEVERE, "Error determining the value for "
-                   + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION
+                   + NUMBER_OF_VIEWS_IN_SESSION
                    + ", expected an integer value > 0, using default value ("
-                   + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
+                   + NUMBER_OF_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
         }
 
         Integer numberOfFlashTokensInSessionDefault;
-        Integer i = myfacesConfig.getNumberOfSequentialViewsInSession();
-        int j = myfacesConfig.getNumberOfViewsInSession();
-        if (i != null && i.intValue() > 0)
+        if (myfacesConfig.numberOfSequentialViewsInSession != null
+                && myfacesConfig.numberOfSequentialViewsInSession > 0)
         {
-            numberOfFlashTokensInSessionDefault = (j / i.intValue()) + 1;
+            numberOfFlashTokensInSessionDefault = (myfacesConfig.numberOfViewsInSession
+                    / myfacesConfig.numberOfSequentialViewsInSession) + 1;
         }
         else
         {
-            numberOfFlashTokensInSessionDefault = j + 1;
+            numberOfFlashTokensInSessionDefault = myfacesConfig.numberOfViewsInSession + 1;
         }
-        myfacesConfig.setNumberOfFlashTokensInSession(WebConfigParamUtils.getIntegerInitParameter(
-                        extCtx, 
-                        INIT_PARAM_NUMBER_OF_FLASH_TOKENS_IN_SESSION, numberOfFlashTokensInSessionDefault));
-        myfacesConfig.setNumberOfFacesFlowClientWindowIdsInSession(WebConfigParamUtils.getIntegerInitParameter(
-                        extCtx, 
-                        INIT_PARAM_NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION, 
-                        numberOfFlashTokensInSessionDefault));
+
+        myfacesConfig.numberOfFlashTokensInSession = getIntegerInitParameter(extCtx, 
+                NUMBER_OF_FLASH_TOKENS_IN_SESSION,
+                numberOfFlashTokensInSessionDefault);
+
+        myfacesConfig.numberOfFacesFlowClientWindowIdsInSession = getIntegerInitParameter(extCtx, 
+                NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION, 
+                numberOfFlashTokensInSessionDefault);
                         
-        myfacesConfig.setSupportEL3ImportHandler(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                       SUPPORT_EL_3_IMPORT_HANDLER, 
-                       SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT)); 
+        myfacesConfig.supportEL3ImportHandler = getBooleanInitParameter(extCtx, 
+                SUPPORT_EL_3_IMPORT_HANDLER, 
+                SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT); 
 
-        myfacesConfig.setStrictJsf2OriginHeaderAppPath(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
-                        STRICT_JSF_2_ORIGIN_HEADER_APP_PATH, 
-                        STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT));
+        myfacesConfig.strictJsf2OriginHeaderAppPath = getBooleanInitParameter(extCtx, 
+                STRICT_JSF_2_ORIGIN_HEADER_APP_PATH, 
+                STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT);
 
+        myfacesConfig.resourceBufferSize = getIntegerInitParameter(extCtx, 
+                RESOURCE_BUFFER_SIZE, 
+                RESOURCE_BUFFER_SIZE_DEFAULT);
+        
+        myfacesConfig.useCdiForAnnotationScanning = getBooleanInitParameter(extCtx,
+                USE_CDI_FOR_ANNOTATION_SCANNING,
+                USE_CDI_FOR_ANNOTATION_SCANNING_DEFAULT);
+        
+        myfacesConfig.resourceHandlerCacheEnabled = getBooleanInitParameter(extCtx,
+                RESOURCE_HANDLER_CACHE_ENABLED,
+                RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT);
+        
+        myfacesConfig.resourceHandlerCacheSize = getIntegerInitParameter(extCtx,
+                RESOURCE_HANDLER_CACHE_SIZE,
+                RESOURCE_HANDLER_CACHE_SIZE_DEFAULT);
+        
+        myfacesConfig.scanPackages = getStringInitParameter(extCtx,
+                SCAN_PACKAGES,
+                null);
+        
         return myfacesConfig;
     }
 
@@ -734,6 +811,28 @@ public class MyfacesConfig
         return strValue;
     }
 
+    private static int getIntegerInitParameter(ExternalContext externalContext,
+                                                  String paramName,
+                                                  int defaultValue)
+    {
+       String strValue = externalContext.getInitParameter(paramName);
+       if (strValue == null)
+       {
+           return defaultValue;
+       }
+       else
+       {
+           try
+           {
+               return Integer.parseInt(strValue);
+           }
+           catch (NumberFormatException e)
+           {
+           }
+           return defaultValue;
+       }
+    }
+    
     private static long getLongInitParameter(ExternalContext externalContext,
                                                   String paramName,
                                                   long defaultValue)
@@ -756,121 +855,54 @@ public class MyfacesConfig
        }
     }
 
-    public long getConfigRefreshPeriod()
-    {
-        return _configRefreshPeriod;
-    }
-
-    public void setConfigRefreshPeriod(long configRefreshPeriod)
-    {
-        _configRefreshPeriod = configRefreshPeriod;
-    }
-
-    /**
-     * JSF API 1.2 defines a "javax.faces.ViewState" client parameter, that must be rendered as both the "name"
-     * and the "id" attribute of the hidden input that is rendered for the purpose of state saving
-     * (see ResponseStateManager.VIEW_STATE_PARAM).
-     * Actually this causes duplicate id attributes and thus invalid XHTML pages when multiple forms are rendered on
-     * one page. With the {@link #INIT_PARAM_RENDER_VIEWSTATE_ID} context parameter you can tune this behaviour.
-     * <p>Set it to:</p>
-     * <ul><li>true - to render JSF 1.2 compliant id attributes (that might cause invalid XHTML), or</li>
-     * <li>false - to omit rendering of the id attribute (which is only needed for very special AJAX/Javascript 
-     * components)</li></ul>
-     * <p>Default value is: true (for backwards compatibility and JSF 1.2 compliancy) </p>
-     * @return true, if the client state hidden input "javax.faces.ViewState" id attribute should be rendered
-     */
-    public boolean isRenderViewStateId()
+    public boolean isMyfacesImplAvailable()
     {
-        return _renderViewStateId;
+        return MYFACES_IMPL_AVAILABLE;
     }
 
-    public void setRenderViewStateId(boolean renderViewStateId)
+    public boolean isRiImplAvailable()
     {
-        _renderViewStateId = renderViewStateId;
+        return RI_IMPL_AVAILABLE;
     }
 
-    /**
-     * <p>W3C recommends to use the "&amp;amp;" entity instead of a plain "&amp;" character within HTML.
-     * This also applies to attribute values and thus to the "href" attribute of &lt;a&gt; elements as well.
-     * Even more, when XHTML is used as output the usage of plain "&amp;" characters is forbidden and would lead to
-     * invalid XML code.
-     * Therefore, since version 1.1.6 MyFaces renders the correct "&amp;amp;" entity for links.</p>
-     * <p>The init parameter
-     * {@link #INIT_PARAM_STRICT_XHTML_LINKS} makes it possible to restore the old behaviour and to make MyFaces
-     * "bug compatible" to the Sun RI which renders plain "&amp;" chars in links as well.</p>
-     * @see <a href="http://www.w3.org/TR/html401/charset.html#h-5.3.2">HTML 4.01 Specification</a>
-     * @see <a href="http://issues.apache.org/jira/browse/MYFACES-1774">Jira: MYFACES-1774</a>
-     * @return true if ampersand characters ("&amp;") should be correctly rendered as "&amp;amp;" entities 
-     *         within link urls (=default), false for old (XHTML incompatible) behaviour
-     */
-    public boolean isStrictXhtmlLinks()
+    public boolean isStrictJsf2AllowSlashLibraryName()
     {
-        return _strictXhtmlLinks;
+        return strictJsf2AllowSlashLibraryName;
     }
 
-    public void setStrictXhtmlLinks(boolean strictXhtmlLinks)
+    public long getConfigRefreshPeriod()
     {
-        _strictXhtmlLinks = strictXhtmlLinks;
+        return configRefreshPeriod;
     }
 
-    public boolean isMyfacesImplAvailable()
+    public boolean isRenderViewStateId()
     {
-        return MYFACES_IMPL_AVAILABLE;
+        return renderViewStateId;
     }
 
-    public boolean isRiImplAvailable()
-    {
-        return RI_IMPL_AVAILABLE;
-    }
-
-    public void setRenderClearJavascriptOnButton(
-            boolean renderClearJavascriptOnButton)
+    public boolean isStrictXhtmlLinks()
     {
-        _renderClearJavascriptOnButton = renderClearJavascriptOnButton;
+        return strictXhtmlLinks;
     }
 
-    /**
-     * This param renders the clear javascript on button necessary only for
-     * compatibility with hidden fields feature of myfaces. This is done 
-     * because jsf ri does not render javascript on onclick method for button,
-     * so myfaces should do this.
-     * 
-     * @return
-     */
     public boolean isRenderClearJavascriptOnButton()
     {
-        return _renderClearJavascriptOnButton;
+        return renderClearJavascriptOnButton;
     }
-    
+
     public String getDelegateFacesServlet()
     {
-        return _delegateFacesServlet;
-    }
-    
-    public void setDelegateFacesServlet(String delegateFacesServlet)
-    {
-        _delegateFacesServlet = delegateFacesServlet;
+        return delegateFacesServlet;
     }
 
     public boolean isRefreshTransientBuildOnPSS()
     {
-        return _refreshTransientBuildOnPSS;
-    }
-
-    public void setRefreshTransientBuildOnPSS(boolean refreshTransientBuildOnPSS)
-    {
-        this._refreshTransientBuildOnPSS = refreshTransientBuildOnPSS;
+        return refreshTransientBuildOnPSS;
     }
 
     public boolean isRefreshTransientBuildOnPSSAuto()
     {
-        return _refreshTransientBuildOnPSSAuto;
-    }
-
-    public void setRefreshTransientBuildOnPSSAuto(
-            boolean refreshTransientBuildOnPSSAuto)
-    {
-        this._refreshTransientBuildOnPSSAuto = refreshTransientBuildOnPSSAuto;
+        return refreshTransientBuildOnPSSAuto;
     }
 
     public boolean isRefreshTransientBuildOnPSSPreserveState()
@@ -878,262 +910,140 @@ public class MyfacesConfig
         return refreshTransientBuildOnPSSPreserveState;
     }
 
-    public void setRefreshTransientBuildOnPSSPreserveState(
-            boolean refreshTransientBuildOnPSSPreserveState)
-    {
-        this.refreshTransientBuildOnPSSPreserveState = refreshTransientBuildOnPSSPreserveState;
-    }
-    
     public boolean isValidateXML()
     {
-        return _validateXML;
-    }
-
-    public void setValidateXML(boolean validateXML)
-    {
-        _validateXML = validateXML;
+        return validateXML;
     }
 
     public boolean isWrapScriptContentWithXmlCommentTag()
     {
-        return _wrapScriptContentWithXmlCommentTag;
-    }
-
-    public void setWrapScriptContentWithXmlCommentTag(
-            boolean wrapScriptContentWithXmlCommentTag)
-    {
-        this._wrapScriptContentWithXmlCommentTag = wrapScriptContentWithXmlCommentTag;
+        return wrapScriptContentWithXmlCommentTag;
     }
 
     public boolean isRenderFormSubmitScriptInline()
     {
-        return _renderFormSubmitScriptInline;
-    }
-
-    public void setRenderFormSubmitScriptInline(
-            boolean renderFormSubmitScriptInline)
-    {
-        _renderFormSubmitScriptInline = renderFormSubmitScriptInline;
+        return renderFormSubmitScriptInline;
     }
 
     public boolean isDebugPhaseListenerEnabled()
     {
-        return _debugPhaseListenerEnabled;
-    }
-
-    public void setDebugPhaseListenerEnabled(boolean debugPhaseListener)
-    {
-        this._debugPhaseListenerEnabled = debugPhaseListener;
+        return debugPhaseListenerEnabled;
     }
 
     public boolean isStrictJsf2CCELResolver()
     {
-        return _strictJsf2CCELResolver;
-    }
-
-    public void setStrictJsf2CCELResolver(boolean strictJsf2CCELResolver)
-    {
-        this._strictJsf2CCELResolver = strictJsf2CCELResolver;
+        return strictJsf2CCELResolver;
     }
 
     public String getDefaultResponseWriterContentTypeMode()
     {
-        return _defaultResponseWriterContentTypeMode;
-    }
-
-    public void setDefaultResponseWriterContentTypeMode(
-            String defaultResponseWriterContentTypeMode)
-    {
-        this._defaultResponseWriterContentTypeMode = defaultResponseWriterContentTypeMode;
+        return defaultResponseWriterContentTypeMode;
     }
 
     public boolean isViewUniqueIdsCacheEnabled()
     {
-        return _viewUniqueIdsCacheEnabled;
-    }
-
-    public void setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled)
-    {
-        _viewUniqueIdsCacheEnabled = viewUniqueIdsCacheEnabled;
-    }
-
-    public boolean isSupportJSPAndFacesEL()
-    {
-        return _supportJSPAndFacesEL;
-    }
-
-    public void setSupportJSPAndFacesEL(boolean supportJSPANDFacesEL)
-    {
-        _supportJSPAndFacesEL = supportJSPANDFacesEL;
+        return viewUniqueIdsCacheEnabled;
     }
 
     public int getComponentUniqueIdsCacheSize()
     {
-        return _componentUniqueIdsCacheSize;
+        return componentUniqueIdsCacheSize;
     }
 
-    public void setComponentUniqueIdsCacheSize(int componentUniqueIdsCacheSize)
+    public boolean isSupportJSPAndFacesEL()
     {
-        this._componentUniqueIdsCacheSize = componentUniqueIdsCacheSize;
+        return supportJSPAndFacesEL;
     }
 
     public String getGaeJsfJarFiles()
     {
-        return _gaeJsfJarFiles;
-    }
-
-    public void setGaeJsfJarFiles(String gaeJsfJarFiles)
-    {
-        this._gaeJsfJarFiles = gaeJsfJarFiles;
+        return gaeJsfJarFiles;
     }
 
     public String getGaeJsfAnnotationsJarFiles()
     {
-        return _gaeJsfAnnotationsJarFiles;
-    }
-
-    public void setGaeJsfAnnotationsJarFiles(String gaeJsfAnnotationsJarFiles)
-    {
-        this._gaeJsfAnnotationsJarFiles = gaeJsfAnnotationsJarFiles;
+        return gaeJsfAnnotationsJarFiles;
     }
 
     public boolean isStrictJsf2ViewNotFound()
     {
-        return _strictJsf2ViewNotFound;
-    }
-
-    public void setStrictJsf2ViewNotFound(boolean strictJsf2ViewNotFound)
-    {
-        this._strictJsf2ViewNotFound = strictJsf2ViewNotFound;
+        return strictJsf2ViewNotFound;
     }
 
     public boolean isEarlyFlushEnabled()
     {
-        return _earlyFlushEnabled;
-    }
-
-    public void setEarlyFlushEnabled(boolean earlyFlushEnabled)
-    {
-        this._earlyFlushEnabled = earlyFlushEnabled;
+        return earlyFlushEnabled;
     }
 
     public boolean isStrictJsf2FaceletsCompatibility()
     {
-        return _strictJsf2FaceletsCompatibility;
-    }
-
-    public void setStrictJsf2FaceletsCompatibility(boolean strictJsf2FaceletsCompatibility)
-    {
-        this._strictJsf2FaceletsCompatibility = strictJsf2FaceletsCompatibility;
+        return strictJsf2FaceletsCompatibility;
     }
 
     public boolean isRenderFormViewStateAtBegin()
     {
-        return _renderFormViewStateAtBegin;
-    }
-
-    public void setRenderFormViewStateAtBegin(boolean renderFormViewStateAtBegin)
-    {
-        this._renderFormViewStateAtBegin = renderFormViewStateAtBegin;
+        return renderFormViewStateAtBegin;
     }
 
     public boolean isFlashScopeDisabled()
     {
-        return _flashScopeDisabled;
-    }
-
-    public void setFlashScopeDisabled(boolean flashScopeDisabled)
-    {
-        this._flashScopeDisabled = flashScopeDisabled;
+        return flashScopeDisabled;
     }
 
-    /**
-     * @return the _numberOfViewsInSession
-     */
     public Integer getNumberOfViewsInSession()
     {
-        return _numberOfViewsInSession;
+        return numberOfViewsInSession;
     }
 
-    /**
-     * @param numberOfViewsInSession the _numberOfViewsInSession to set
-     */
-    public void setNumberOfViewsInSession(Integer numberOfViewsInSession)
+    public Integer getNumberOfSequentialViewsInSession()
     {
-        this._numberOfViewsInSession = numberOfViewsInSession;
+        return numberOfSequentialViewsInSession;
     }
 
-    /**
-     * @return the _numberOfSequentialViewsInSession
-     */
-    public Integer getNumberOfSequentialViewsInSession()
+    public Integer getNumberOfFlashTokensInSession()
     {
-        return _numberOfSequentialViewsInSession;
+        return numberOfFlashTokensInSession;
     }
 
-    /**
-     * @param numberOfSequentialViewsInSession the _numberOfSequentialViewsInSession to set
-     */
-    public void setNumberOfSequentialViewsInSession(Integer numberOfSequentialViewsInSession)
+    public Integer getNumberOfFacesFlowClientWindowIdsInSession()
     {
-        this._numberOfSequentialViewsInSession = numberOfSequentialViewsInSession;
+        return numberOfFacesFlowClientWindowIdsInSession;
     }
 
-    /**
-     * @return the _numberOfFlashTokensInSession
-     */
-    public Integer getNumberOfFlashTokensInSession()
+    public boolean isSupportEL3ImportHandler()
     {
-        return _numberOfFlashTokensInSession;
+        return supportEL3ImportHandler;
     }
 
-    /**
-     * @param numberOfFlashTokensInSession the _numberOfFlashTokensInSession to set
-     */
-    public void setNumberOfFlashTokensInSession(Integer numberOfFlashTokensInSession)
+    public boolean isStrictJsf2OriginHeaderAppPath()
     {
-        this._numberOfFlashTokensInSession = numberOfFlashTokensInSession;
+        return strictJsf2OriginHeaderAppPath;
     }
 
-    /**
-     * @return the _numberOfFacesFlowClientWindowIdsInSession
-     */
-    public Integer getNumberOfFacesFlowClientWindowIdsInSession()
+    public int getResourceBufferSize()
     {
-        return _numberOfFacesFlowClientWindowIdsInSession;
+        return resourceBufferSize;
     }
 
-    /**
-     * @param numberOfFacesFlowClientWindowIdsInSession the _numberOfFacesFlowClientWindowIdsInSession to set
-     */
-    public void setNumberOfFacesFlowClientWindowIdsInSession(Integer numberOfFacesFlowClientWindowIdsInSession)
+    public boolean isUseCdiForAnnotationScanning()
     {
-        this._numberOfFacesFlowClientWindowIdsInSession = numberOfFacesFlowClientWindowIdsInSession;
+        return useCdiForAnnotationScanning;
     }
-    
-    /**
-     * @return the _supportEL3ImportHandler
-     */
-    public boolean isSupportEL3ImportHandler()
+
+    public boolean isResourceHandlerCacheEnabled()
     {
-        return _supportEL3ImportHandler;
+        return resourceHandlerCacheEnabled;
     }
-    
-    /**
-     * @param supportEL3ImportHandler the _supportEL3ImportHandler to set
-     */
-    public void setSupportEL3ImportHandler(boolean supportEL3ImportHandler)
+
+    public int getResourceHandlerCacheSize()
     {
-        this._supportEL3ImportHandler = supportEL3ImportHandler;
+        return resourceHandlerCacheSize;
     }
 
-    public boolean isStrictJsf2OriginHeaderAppPath()
+    public String getScanPackages()
     {
-        return _strictJsf2OriginHeaderAppPath;
+        return scanPackages;
     }
+
     
-    public void setStrictJsf2OriginHeaderAppPath(boolean strictJsf2OriginHeaderAppPath)
-    {
-        this._strictJsf2OriginHeaderAppPath = strictJsf2OriginHeaderAppPath;
-    }
 }
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/CdiAnnotationProviderExtension.java b/impl/src/main/java/org/apache/myfaces/config/annotation/CdiAnnotationProviderExtension.java
index 540d079..3336adb 100644
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/CdiAnnotationProviderExtension.java
+++ b/impl/src/main/java/org/apache/myfaces/config/annotation/CdiAnnotationProviderExtension.java
@@ -34,18 +34,10 @@ import javax.faces.render.FacesBehaviorRenderer;
 import javax.faces.render.FacesRenderer;
 import javax.faces.validator.FacesValidator;
 import javax.faces.view.facelets.FaceletsResourceResolver;
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
 import org.apache.myfaces.config.element.NamedEvent;
 
 public class CdiAnnotationProviderExtension implements Extension
 {
-    /**
-     * Defines if CDI should be used for annotation scanning to improve the startup performance.
-     */
-    @JSFWebConfigParam(since="2.2.9", tags = "performance", defaultValue = "false")
-    public static final String USE_CDI_FOR_ANNOTATION_SCANNING
-            = "org.apache.myfaces.annotation.USE_CDI_FOR_ANNOTATION_SCANNING";
-
     private Map<Class<? extends Annotation>, Set<Class<?>>> map;
     private Class<? extends Annotation>[] annotationsToScan;
 
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java
index 0bd6158..4ddb6c6 100644
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java
+++ b/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java
@@ -50,7 +50,6 @@ import javax.faces.render.FacesRenderer;
 import javax.faces.validator.FacesValidator;
 import javax.faces.view.facelets.FaceletsResourceResolver;
 
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
 import org.apache.myfaces.cdi.util.BeanProvider;
 import org.apache.myfaces.cdi.util.CDIUtils;
 import org.apache.myfaces.config.MyfacesConfig;
@@ -71,13 +70,6 @@ import org.apache.myfaces.view.facelets.util.Classpath;
 public class DefaultAnnotationProvider extends AnnotationProvider
 {
     private static final Logger log = Logger.getLogger(DefaultAnnotationProvider.class.getName());
-    
-    /**
-     * Servlet context init parameter which defines which packages to scan
-     * for beans, separated by commas.
-     */
-    @JSFWebConfigParam(since="2.0")
-    public static final String SCAN_PACKAGES = "org.apache.myfaces.annotation.SCAN_PACKAGES";
 
     /**
      * <p>Prefix path used to locate web application classes for this
@@ -151,9 +143,7 @@ public class DefaultAnnotationProvider extends AnnotationProvider
     @Override
     public Map<Class<? extends Annotation>, Set<Class<?>>> getAnnotatedClasses(ExternalContext ctx)
     {
-        String useCdiForAnnotationScanning =
-                ctx.getInitParameter(CdiAnnotationProviderExtension.USE_CDI_FOR_ANNOTATION_SCANNING);
-        if (useCdiForAnnotationScanning != null && "true".equalsIgnoreCase(useCdiForAnnotationScanning.trim()))
+        if (MyfacesConfig.getCurrentInstance(ctx).isUseCdiForAnnotationScanning())
         {
             BeanManager beanManager = CDIUtils.getBeanManager(ctx);
             CdiAnnotationProviderExtension extension =
@@ -210,22 +200,6 @@ public class DefaultAnnotationProvider extends AnnotationProvider
             processClass(map, clazz);
         }
         
-        //3. Scan on myfaces-impl for annotations available on myfaces-impl.
-        //Also scan jar including META-INF/standard-faces-config.xml
-        //(myfaces-impl jar file)
-        // -= Leonardo Uribe =- No annotations in MyFaces jars, code not
-        // necessary, because all config is already in standard-faces-config.xml
-        //URL url = getClassLoader().getResource(STANDARD_FACES_CONFIG_RESOURCE);
-        //if (url == null)
-        //{
-        //    url = getClass().getClassLoader().getResource(STANDARD_FACES_CONFIG_RESOURCE);
-        //}
-        //classes = getAnnotatedMyfacesImplClasses(ctx, url);
-        //for (Class<?> clazz : classes)
-        //{
-        //    processClass(map, clazz);
-        //}
-        
         return map;
     }
     
@@ -343,29 +317,11 @@ public class DefaultAnnotationProvider extends AnnotationProvider
     protected Collection<Class<?>> getAnnotatedMyfacesImplClasses(ExternalContext ctx, URL url)
     {
         return Collections.emptyList();
-        /*
-        try
-        {
-            List<Class<?>> list = new ArrayList<Class<?>>();
-            JarFile jarFile = getJarFile(url);
-            if (jarFile == null)
-            {
-                return list;
-            }
-            else
-            {
-                return archiveClasses(ctx, jarFile, list);
-            }
-        }
-        catch(IOException e)
-        {
-            throw new FacesException("cannot scan jar file for annotations:"+url, e);
-        }*/
     }
 
     protected Collection<Class<?>> getAnnotatedWebInfClasses(ExternalContext ctx) throws IOException
     {
-        String scanPackages = ctx.getInitParameter(SCAN_PACKAGES);
+        String scanPackages = MyfacesConfig.getCurrentInstance(ctx).getScanPackages();
         if (scanPackages != null)
         {
             try
@@ -407,12 +363,10 @@ public class DefaultAnnotationProvider extends AnnotationProvider
         {
             if (scanPackageToken.toLowerCase().endsWith(".jar"))
             {
-                URL jarResource = externalContext.getResource(WEB_LIB_PREFIX
-                        + scanPackageToken);
+                URL jarResource = externalContext.getResource(WEB_LIB_PREFIX + scanPackageToken);
                 String jarURLString = "jar:" + jarResource.toString() + "!/";
                 URL url = new URL(jarURLString);
-                JarFile jarFile = ((JarURLConnection) url.openConnection())
-                        .getJarFile();
+                JarFile jarFile = ((JarURLConnection) url.openConnection()).getJarFile();
 
                 archiveClasses(jarFile, list);
             }
@@ -470,9 +424,7 @@ public class DefaultAnnotationProvider extends AnnotationProvider
             try
             {
                 in = new DataInputStream(jar.getInputStream(entry));
-                couldContainAnnotation = _filter
-                        .couldContainAnnotationsOnClassDef(in,
-                                byteCodeAnnotationsNames);
+                couldContainAnnotation = _filter.couldContainAnnotationsOnClassDef(in, byteCodeAnnotationsNames);
             }
             catch (IOException e)
             {
@@ -483,8 +435,7 @@ public class DefaultAnnotationProvider extends AnnotationProvider
                 couldContainAnnotation = true;
                 if (log.isLoggable(Level.FINE))
                 {
-                    log.fine("IOException when filtering class " + name
-                            + " for annotations");
+                    log.fine("IOException when filtering class " + name + " for annotations");
                 }
             }
             finally
@@ -587,7 +538,7 @@ public class DefaultAnnotationProvider extends AnnotationProvider
                                 + " ."
                                 + " This could happen because maven jetty plugin is used"
                                 + " (goal jetty:run). Try configure "
-                                + SCAN_PACKAGES + " init parameter "
+                                + MyfacesConfig.SCAN_PACKAGES + " init parameter "
                                 + "or use jetty:run-exploded instead.");
             }
         }
@@ -606,11 +557,9 @@ public class DefaultAnnotationProvider extends AnnotationProvider
                     boolean couldContainAnnotation = false;
                     try
                     {
-                        in = new DataInputStream(externalContext
-                                .getResourceAsStream(path));
-                        couldContainAnnotation = _filter
-                                .couldContainAnnotationsOnClassDef(in,
-                                        byteCodeAnnotationsNames);
+                        in = new DataInputStream(externalContext.getResourceAsStream(path));
+                        couldContainAnnotation = _filter.couldContainAnnotationsOnClassDef(in,
+                                byteCodeAnnotationsNames);
                     }
                     catch (IOException e)
                     {
@@ -621,8 +570,7 @@ public class DefaultAnnotationProvider extends AnnotationProvider
                         couldContainAnnotation = true;
                         if (log.isLoggable(Level.FINE))
                         {
-                            log.fine("IOException when filtering class " + path
-                                    + " for annotations");
+                            log.fine("IOException when filtering class " + path + " for annotations");
                         }
                     }
                     finally
diff --git a/impl/src/main/java/org/apache/myfaces/context/flash/FlashImpl.java b/impl/src/main/java/org/apache/myfaces/context/flash/FlashImpl.java
index 2ff3144..9dfdb35 100644
--- a/impl/src/main/java/org/apache/myfaces/context/flash/FlashImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/context/flash/FlashImpl.java
@@ -1243,7 +1243,7 @@ public class FlashImpl extends Flash implements ReleasableFlash
         if (_flashScopeDisabled)
         {
             throw new FlashScopeDisabledException("Flash scope was disabled by context param " 
-                + MyfacesConfig.INIT_PARAM_FLASH_SCOPE_DISABLED + " but erroneously accessed");
+                + MyfacesConfig.FLASH_SCOPE_DISABLED + " but erroneously accessed");
         }
     }
     
diff --git a/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerCache.java b/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerCache.java
index 1ad2261..d07eb13 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerCache.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerCache.java
@@ -25,36 +25,13 @@ import javax.faces.application.ProjectStage;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
+import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.util.ConcurrentLRUCache;
-import org.apache.myfaces.util.WebConfigParamUtils;
 
 public class ResourceHandlerCache
 {
     private static final Logger log = Logger.getLogger(ResourceHandlerCache.class.getName());
 
-    /**
-     * Controls the size of the cache used to check if a resource exists or not. 
-     * 
-     * <p>See org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED for details.</p>
-     */
-    @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="resources", 
-            classType="java.lang.Integer", tags="performance")
-    private static final String RESOURCE_HANDLER_CACHE_SIZE_ATTRIBUTE = 
-        "org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE";
-    private static final int RESOURCE_HANDLER_CACHE_DEFAULT_SIZE = 500;
-
-    /**
-     * Enable or disable the cache used to "remember" if a resource handled by 
-     * the default ResourceHandler exists or not.
-     * 
-     */
-    @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", group="resources", 
-            expectedValues="true,false", tags="performance")
-    private static final String RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE = 
-        "org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED";
-    private static final boolean RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT = true;
-
     private boolean _resourceCacheEnabled = false;
 
     private volatile ConcurrentLRUCache<Object, ResourceValue> _resourceCacheMap = null;
@@ -75,9 +52,7 @@ public class ResourceHandlerCache
         if (facesContext.isProjectStage(ProjectStage.Production))
         {
             //if in production, make sure that the cache is not explicitly disabled via context param
-            _resourceCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(externalContext, 
-                    ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE,
-                    ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT);
+            _resourceCacheEnabled = MyfacesConfig.getCurrentInstance(externalContext).isResourceHandlerCacheEnabled();
 
             if (log.isLoggable(Level.FINE))
             {
@@ -87,9 +62,7 @@ public class ResourceHandlerCache
         
         if (_resourceCacheEnabled)
         {
-            int maxSize = WebConfigParamUtils.getIntegerInitParameter(externalContext, 
-                    RESOURCE_HANDLER_CACHE_SIZE_ATTRIBUTE,
-                    RESOURCE_HANDLER_CACHE_DEFAULT_SIZE);
+            int maxSize = MyfacesConfig.getCurrentInstance(externalContext).getResourceHandlerCacheSize();
 
             _resourceCacheMap = new ConcurrentLRUCache<>((maxSize * 4 + 3) / 3, maxSize);
             _viewResourceCacheMap = new ConcurrentLRUCache<>((maxSize * 4 + 3) / 3, maxSize);
diff --git a/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheContractResourceLoader.java b/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheContractResourceLoader.java
index b5f7e14..a8880df 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheContractResourceLoader.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheContractResourceLoader.java
@@ -33,8 +33,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import javax.faces.FacesException;
 import javax.faces.application.Resource;
 import javax.faces.context.FacesContext;
-import org.apache.myfaces.application.ResourceHandlerImpl;
-import org.apache.myfaces.util.WebConfigParamUtils;
+import org.apache.myfaces.config.MyfacesConfig;
 
 /**
  * ResourceLoader that uses a temporal folder to cache resources, avoiding the problem
@@ -295,14 +294,12 @@ public class TempDirFileCacheContractResourceLoader extends ContractResourceLoad
     {
         if (_resourceBufferSize == -1)
         {
-            _resourceBufferSize = WebConfigParamUtils.getIntegerInitParameter(
-                FacesContext.getCurrentInstance().getExternalContext(),
-                ResourceHandlerImpl.INIT_PARAM_RESOURCE_BUFFER_SIZE,
-                ResourceHandlerImpl.INIT_PARAM_RESOURCE_BUFFER_SIZE_DEFAULT);
+            _resourceBufferSize = MyfacesConfig.getCurrentInstance().getResourceBufferSize();
         }
         return _resourceBufferSize;
     }
     
+    @Override
     public ContractResourceLoader getWrapped()
     {
         return delegate;
diff --git a/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheResourceLoader.java b/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheResourceLoader.java
index 8beb071..6f691fc 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheResourceLoader.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheResourceLoader.java
@@ -33,8 +33,8 @@ import java.util.concurrent.ConcurrentHashMap;
 import javax.faces.FacesException;
 import javax.faces.application.Resource;
 import javax.faces.context.FacesContext;
-import org.apache.myfaces.application.ResourceHandlerImpl;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
+import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.util.WebConfigParamUtils;
 
 /**
@@ -351,14 +351,12 @@ public class TempDirFileCacheResourceLoader extends ResourceLoaderWrapper
     {
         if (_resourceBufferSize == -1)
         {
-            _resourceBufferSize = WebConfigParamUtils.getIntegerInitParameter(
-                FacesContext.getCurrentInstance().getExternalContext(),
-                ResourceHandlerImpl.INIT_PARAM_RESOURCE_BUFFER_SIZE,
-                ResourceHandlerImpl.INIT_PARAM_RESOURCE_BUFFER_SIZE_DEFAULT);
+            _resourceBufferSize = MyfacesConfig.getCurrentInstance().getResourceBufferSize();
         }
         return _resourceBufferSize;
     }
     
+    @Override
     public ResourceLoader getWrapped()
     {
         return delegate;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java b/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
index 2e91b8a..d958daa 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
@@ -195,7 +195,7 @@ public class ViewPoolProcessor
             if (MyfacesConfig.getCurrentInstance(context.getExternalContext()).isStrictJsf2FaceletsCompatibility())
             {
                 Logger.getLogger(ViewPoolProcessor.class.getName()).log(
-                    Level.INFO, MyfacesConfig.INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY +
+                    Level.INFO, MyfacesConfig.STRICT_JSF_2_FACELETS_COMPATIBILITY +
                     " web config parameter is set to \"" + "true" +
                     "\". To enable view pooling this param "+
                     " must be set to \"false\". View Pooling disabled.");
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
index 6a77f5b..dad7058 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
@@ -66,6 +66,7 @@ import javax.websocket.server.ServerContainer;
 import javax.websocket.server.ServerEndpointConfig;
 import org.apache.myfaces.cdi.util.BeanProvider;
 import org.apache.myfaces.cdi.util.CDIUtils;
+import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.config.annotation.CdiAnnotationProviderExtension;
 import org.apache.myfaces.push.EndpointImpl;
 import org.apache.myfaces.push.WebsocketConfigurator;
@@ -420,11 +421,10 @@ public abstract class AbstractFacesInitializer implements FacesInitializer
 
     protected void validateFacesConfig(ServletContext servletContext, ExternalContext externalContext)
     {
-        String validate = servletContext.getInitParameter(FacesConfigValidator.VALIDATE_CONTEXT_PARAM);
-        if ("true".equals(validate) && log.isLoggable(Level.WARNING))
-        { // the default value is false
-            List<String> warnings = FacesConfigValidator.validate(
-                    externalContext);
+        String validate = servletContext.getInitParameter(MyfacesConfig.VALIDATE);
+        if ("true".equals(validate) && log.isLoggable(Level.WARNING)) // the default value is false
+        {
+            List<String> warnings = FacesConfigValidator.validate(externalContext);
 
             for (String warning : warnings)
             {
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerFactory.java b/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerFactory.java
index 1ad265e..5865230 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerFactory.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerFactory.java
@@ -101,7 +101,7 @@ public class FacesInitializerFactory
     private static FacesInitializer _getDefaultFacesInitializer(ServletContext context)
     {
         // No MyfacesConfig available yet, we must read the parameter directly:
-        String initParameter = context.getInitParameter(MyfacesConfig.INIT_PARAM_SUPPORT_JSP_AND_FACES_EL);
+        String initParameter = context.getInitParameter(MyfacesConfig.SUPPORT_JSP_AND_FACES_EL);
         if (Boolean.FALSE.toString().equals(initParameter))
         {
             return new FaceletsInitilializer();
diff --git a/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
index 1bc5633..61028e9 100644
--- a/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
@@ -48,7 +48,7 @@ public class ContractsCreateResourceMyFacesRequestTestCase extends AbstractMyFac
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.contracts");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.CONFIG_FILES", "/blue-faces-config.xml");
     }
     
diff --git a/impl/src/test/java/org/apache/myfaces/application/contracts/DefaultContractsConfigMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/application/contracts/DefaultContractsConfigMyFacesRequestTestCase.java
index 06549d6..cb9453d 100644
--- a/impl/src/test/java/org/apache/myfaces/application/contracts/DefaultContractsConfigMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/application/contracts/DefaultContractsConfigMyFacesRequestTestCase.java
@@ -45,7 +45,7 @@ public class DefaultContractsConfigMyFacesRequestTestCase extends AbstractMyFace
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.contracts");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
     }
     
     @Test
diff --git a/impl/src/test/java/org/apache/myfaces/application/contracts/SingleContractMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/application/contracts/SingleContractMyFacesRequestTestCase.java
index 2beee3d..5c36ccc 100644
--- a/impl/src/test/java/org/apache/myfaces/application/contracts/SingleContractMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/application/contracts/SingleContractMyFacesRequestTestCase.java
@@ -52,7 +52,7 @@ public class SingleContractMyFacesRequestTestCase extends AbstractMyFacesRequest
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.contracts");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.CONFIG_FILES", "/no-contract-faces-config.xml");
         servletContext.addInitParameter(ProjectStage.PROJECT_STAGE_PARAM_NAME, ProjectStage.Production.toString());
     }
diff --git a/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java
index 0a1a04d..d71c374 100644
--- a/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java
@@ -49,7 +49,7 @@ public class FlowMyFacesCDIRequestTestCase extends AbstractMyFacesCDIRequestTest
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.flow");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.CONFIG_FILES", "/WEB-INF/flow1-flow.xml");
         servletContext.addInitParameter("javax.faces.CLIENT_WINDOW_MODE", "url");
     }
diff --git a/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesRequestTestCase.java
index 55dc42f..39d6cb6 100644
--- a/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesRequestTestCase.java
@@ -51,7 +51,7 @@ public class FlowMyFacesRequestTestCase extends AbstractMyFacesRequestTestCase
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.flow");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.CONFIG_FILES", "/WEB-INF/flow1-flow.xml");
         servletContext.addInitParameter("javax.faces.CLIENT_WINDOW_MODE", "url");
     }
diff --git a/impl/src/test/java/org/apache/myfaces/application/flow/FlowResourceHandlerMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/application/flow/FlowResourceHandlerMyFacesRequestTestCase.java
index 77da47f..71d0c12 100644
--- a/impl/src/test/java/org/apache/myfaces/application/flow/FlowResourceHandlerMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/application/flow/FlowResourceHandlerMyFacesRequestTestCase.java
@@ -47,7 +47,7 @@ public class FlowResourceHandlerMyFacesRequestTestCase extends AbstractMyFacesRe
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.flow");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.CONFIG_FILES", "/WEB-INF/flow1-flow.xml");
         servletContext.addInitParameter("javax.faces.CLIENT_WINDOW_MODE", "url");
     }
diff --git a/impl/src/test/java/org/apache/myfaces/renderkit/HtmlRenderKitImplTest.java b/impl/src/test/java/org/apache/myfaces/renderkit/HtmlRenderKitImplTest.java
index 422e909..38b1def 100644
--- a/impl/src/test/java/org/apache/myfaces/renderkit/HtmlRenderKitImplTest.java
+++ b/impl/src/test/java/org/apache/myfaces/renderkit/HtmlRenderKitImplTest.java
@@ -46,8 +46,10 @@ public class HtmlRenderKitImplTest extends AbstractJsfTestCase
     @Test
     public void testCreateResponseWriterContentType2()
     {
-        MyfacesConfig config = new MyfacesConfig();
-        config.setDefaultResponseWriterContentTypeMode(ContentTypeUtils.XHTML_CONTENT_TYPE);
+        servletContext.setInitParameter(MyfacesConfig.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE,
+                ContentTypeUtils.XHTML_CONTENT_TYPE);
+        
+        MyfacesConfig config = MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());
         facesContext.getExternalContext().getApplicationMap().put(MyfacesConfig.class.getName(), config);
         HtmlRenderKitImpl renderKit = new HtmlRenderKitImpl();
         StringWriter writer = new StringWriter();
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/TagLibraryTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/TagLibraryTestCase.java
index a93465f..a817966 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/TagLibraryTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/TagLibraryTestCase.java
@@ -53,7 +53,7 @@ public class TagLibraryTestCase extends FaceletTestCase
     @Test
     public void testLoadValidLibraryWithValidation() throws Exception
     {
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_VALIDATE_XML, "true");
+        servletContext.addInitParameter(MyfacesConfig.VALIDATE_XML, "true");
 
         FaceletTagLibrary faceletTagLib = TagLibraryConfigUnmarshallerImpl.create(
             externalContext, _validLibUrl);
@@ -64,7 +64,7 @@ public class TagLibraryTestCase extends FaceletTestCase
     @Test
     public void testLoadValidLibraryWithoutValidation() throws Exception
     {
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_VALIDATE_XML, "false");
+        servletContext.addInitParameter(MyfacesConfig.VALIDATE_XML, "false");
 
         FaceletTagLibrary faceletTagLib = TagLibraryConfigUnmarshallerImpl.create(
             externalContext, _validLibUrl);
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolFaceletsTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolFaceletsTestCase.java
index 23fb02b..030c8d8 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolFaceletsTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolFaceletsTestCase.java
@@ -42,7 +42,7 @@ public class ViewPoolFaceletsTestCase extends FaceletTestCase
     {
         super.setUpServletObjects();
         servletContext.addInitParameter(StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.FACELETS_LIBRARIES", "/test-facelet.taglib.xml");
         //servletContext.addInitParameter(ViewPoolProcessor.INIT_PARAM_VIEW_POOL_ENABLED, "true");
         servletContext.addInitParameter("org.apache.myfaces.CACHE_EL_EXPRESSIONS", "alwaysRecompile");
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolMyFacesRequestTestCase.java
index da690ee..961a74c 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/pool/ViewPoolMyFacesRequestTestCase.java
@@ -63,7 +63,7 @@ public class ViewPoolMyFacesRequestTestCase extends AbstractMyFacesCDIRequestTes
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.pool");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter(StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         
         //servletContext.addInitParameter(ViewPoolProcessor.INIT_PARAM_VIEW_POOL_ENABLED, "true");
         servletContext.addInitParameter(ViewPoolImpl.INIT_PARAM_VIEW_POOL_ENTRY_MODE, "soft");
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidMyFacesRequestTestCase.java
index 6463143..601a011 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidMyFacesRequestTestCase.java
@@ -62,7 +62,7 @@ public class AcidMyFacesRequestTestCase extends AbstractMyFacesCDIRequestTestCas
         servletContext.addInitParameter("javax.faces.FACELETS_LIBRARIES", "/WEB-INF/testcomponent.taglib.xml");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
     }
     
     protected ExpressionFactory createExpressionFactory()
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshMyFacesRequestTestCase.java
index 01b91c9..c3e087a 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshMyFacesRequestTestCase.java
@@ -30,7 +30,7 @@ public class AcidPssRefreshMyFacesRequestTestCase extends AcidMyFacesRequestTest
     {
         super.setUpWebConfigParams();
         servletContext.addInitParameter(StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "true");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "true");
     }
     
 }
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshPreserveStateMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshPreserveStateMyFacesRequestTestCase.java
index ca7d1fc..0722763 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshPreserveStateMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/pss/acid/AcidPssRefreshPreserveStateMyFacesRequestTestCase.java
@@ -30,8 +30,8 @@ public class AcidPssRefreshPreserveStateMyFacesRequestTestCase extends AcidMyFac
     {
         super.setUpWebConfigParams();
         servletContext.addInitParameter(StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE, "true");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "true");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE, "true");
     }
     
 }
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
index fbb7e71..c5b473f 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
@@ -46,7 +46,7 @@ public class StatelessTest extends AbstractMyFacesRequestTestCase
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.stateless");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_SERVER);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX", "true");
     }
     
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jsf/core/validation/BeanValidationCDIRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jsf/core/validation/BeanValidationCDIRequestTestCase.java
index 3ff652a..e9f0809 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jsf/core/validation/BeanValidationCDIRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jsf/core/validation/BeanValidationCDIRequestTestCase.java
@@ -48,7 +48,7 @@ public class BeanValidationCDIRequestTestCase extends AbstractMyFacesCDIRequestT
                 "org.apache.myfaces.view.facelets.tag.jsf.core.validation");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("javax.faces.CLIENT_WINDOW_MODE", "url");
         servletContext.addInitParameter("org.apache.myfaces.validator.BEAN_BEFORE_JSF_VALIDATION", "true");
     }
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jstl/core/CifTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jstl/core/CifTestCase.java
index 889e9cc..eccdb7e 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jstl/core/CifTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/tag/jstl/core/CifTestCase.java
@@ -40,7 +40,7 @@ public class CifTestCase extends FaceletTestCase
         
         servletContext.addInitParameter(StateManager.PARTIAL_STATE_SAVING_PARAM_NAME,
                 "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS,"true");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "true");
     }
     
     @Test
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/test/component/FacesComponentAnnotationMyFacesRequestTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/test/component/FacesComponentAnnotationMyFacesRequestTestCase.java
index c1e6a1a..17c59a3 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/test/component/FacesComponentAnnotationMyFacesRequestTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/test/component/FacesComponentAnnotationMyFacesRequestTestCase.java
@@ -43,7 +43,7 @@ public class FacesComponentAnnotationMyFacesRequestTestCase extends AbstractMyFa
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.test.component");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
     }
     
     protected ExpressionFactory createExpressionFactory()
diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/updateheadres/UpdateHeadDynamicViewTestCase.java b/impl/src/test/java/org/apache/myfaces/view/facelets/updateheadres/UpdateHeadDynamicViewTestCase.java
index 4bee078..8667e4b 100644
--- a/impl/src/test/java/org/apache/myfaces/view/facelets/updateheadres/UpdateHeadDynamicViewTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/view/facelets/updateheadres/UpdateHeadDynamicViewTestCase.java
@@ -43,7 +43,7 @@ public class UpdateHeadDynamicViewTestCase extends AbstractMyFacesCDIRequestTest
         servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.updateheadres.managed");
         servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
-        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter(MyfacesConfig.REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
         servletContext.addInitParameter("org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX", "true");
     }