Coverage Report - org.apache.myfaces.shared.config.MyfacesConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
MyfacesConfig
73%
226/308
28%
13/46
1.32
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements.  See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership.  The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License.  You may obtain a copy of the License at
 9  
  *
 10  
  *   http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied.  See the License for the
 16  
  * specific language governing permissions and limitations
 17  
  * under the License.
 18  
  */
 19  
 package org.apache.myfaces.shared.config;
 20  
 
 21  
 
 22  
 import java.util.logging.Level;
 23  
 import java.util.logging.Logger;
 24  
 import javax.faces.context.ExternalContext;
 25  
 import javax.servlet.ServletContext;
 26  
 
 27  
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
 28  
 import org.apache.myfaces.shared.util.ClassUtils;
 29  
 import org.apache.myfaces.shared.util.WebConfigParamUtils;
 30  
 
 31  
 /**
 32  
  * Holds all configuration init parameters (from web.xml) that are independent
 33  
  * from the core implementation. The parameters in this class are available to
 34  
  * all shared, component and implementation classes.
 35  
  * See RuntimeConfig for configuration infos that come from the faces-config
 36  
  * files and are needed by the core implementation.
 37  
  *
 38  
  * MyfacesConfig is meant for components that implement some of the extended features
 39  
  * of MyFaces. Anyhow, using the MyFaces JSF implementation is no precondition for using
 40  
  * MyfacesConfig in custom components. Upon using another JSF implementation
 41  
  * (or omitting the extended init parameters) all config properties will simply have
 42  
  * their default values.
 43  
  */
 44  
 public class MyfacesConfig
 45  
 {
 46  1
     private static final String APPLICATION_MAP_PARAM_NAME = MyfacesConfig.class.getName();
 47  
 
 48  
     /**
 49  
      * Set the virtual path used to serve resources using tomahawk addResource API. Note ExtensionsFilter should
 50  
      * be able to receive request on the prefix used here.
 51  
      */
 52  
     @JSFWebConfigParam(tags="tomahawk")
 53  
     public static final String  INIT_PARAM_RESOURCE_VIRTUAL_PATH = "org.apache.myfaces.RESOURCE_VIRTUAL_PATH";
 54  
     public static final String  INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT = "/faces/myFacesExtensionResource";
 55  
 
 56  
     /**
 57  
      * If true, rendered HTML code will be formatted, so that it is "human readable".
 58  
      * i.e. additional line separators and whitespace will be written, that do not
 59  
      * influence the HTML code. Default: "true"
 60  
      */
 61  
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
 62  
             ignoreUpperLowerCase=true, group="render")
 63  
     private static final String  INIT_PARAM_PRETTY_HTML = "org.apache.myfaces.PRETTY_HTML";
 64  
     private static final boolean INIT_PARAM_PRETTY_HTML_DEFAULT = true;
 65  
 
 66  
     /**
 67  
      * This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output.
 68  
      * If javascript is allowed, command_link anchors will have javascript code 
 69  
      * that submits the corresponding form.
 70  
      * If javascript is not allowed, the state saving info and nested parameters ill be 
 71  
      * added as url parameters.
 72  
      * Default: "true"
 73  
      */
 74  
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
 75  
             ignoreUpperLowerCase=true, group="render")
 76  
     private static final String  INIT_PARAM_ALLOW_JAVASCRIPT = "org.apache.myfaces.ALLOW_JAVASCRIPT";
 77  
     private static final boolean INIT_PARAM_ALLOW_JAVASCRIPT_DEFAULT = true;
 78  
 
 79  
     /**
 80  
      * Deprecated: tomahawk specific param to detect javascript, but it is no longer valid anymore.
 81  
      */
 82  
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
 83  
             ignoreUpperLowerCase=true, deprecated=true, tags="tomahawk", group="render")
 84  
     private static final String  INIT_PARAM_DETECT_JAVASCRIPT = "org.apache.myfaces.DETECT_JAVASCRIPT";
 85  
     private static final boolean INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT = false;
 86  
 
 87  
     /**
 88  
      * If true, a javascript function will be rendered that is able to restore the 
 89  
      * former vertical scroll on every request. Convenient feature if you have pages
 90  
      * with long lists and you do not want the browser page to always jump to the top
 91  
      * if you trigger a link or button action that stays on the same page.
 92  
      * Default: "false"
 93  
      */
 94  
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1", 
 95  
             ignoreUpperLowerCase=true, tags="tomahawk")
 96  
     private static final String  INIT_PARAM_AUTO_SCROLL = "org.apache.myfaces.AUTO_SCROLL";
 97  
     private static final boolean INIT_PARAM_AUTO_SCROLL_DEFAULT = false;
 98  
 
 99  
     /**
 100  
      * Tomahawk specific: A class implementing the
 101  
      * org.apache.myfaces.shared.renderkit.html.util.AddResource
 102  
      * interface. It is responsible to
 103  
      * place scripts and css on the right position in your HTML document.
 104  
      * Default: "org.apache.myfaces.shared.renderkit.html.util.DefaultAddResource"
 105  
      * Follow the description on the MyFaces-Wiki-Performance page to enable
 106  
      * StreamingAddResource instead of DefaultAddResource if you want to
 107  
      * gain performance.
 108  
      */
 109  
     @JSFWebConfigParam(defaultValue="org.apache.myfaces. renderkit.html.util. DefaultAddResource",since="1.1",
 110  
             desc="Tomahawk specific: Indicate the class responsible to place scripts and css using " +
 111  
                  "tomahawk AddResource API", tags="tomahawk")
 112  
     private static final String INIT_PARAM_ADD_RESOURCE_CLASS = "org.apache.myfaces.ADD_RESOURCE_CLASS";
 113  
     private static final String INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT = 
 114  
         "org.apache.myfaces.renderkit.html.util.DefaultAddResource";
 115  
 
 116  
     /**
 117  
      * Tomahawk specific: A very common problem in configuring MyFaces-web-applications
 118  
      * is that the Extensions-Filter is not configured at all
 119  
      * or improperly configured. This parameter will check for a properly
 120  
      * configured Extensions-Filter if it is needed by the web-app.
 121  
      * In most cases this check will work just fine, there might be cases
 122  
      * where an internal forward will bypass the Extensions-Filter and the check
 123  
      * will not work. If this is the case, you can disable the check by setting
 124  
      * this parameter to false.
 125  
      * 
 126  
      * In tomahawk for JSF 2.0 since version 1.1.11, this param is set by default to false, otherwise is true.
 127  
      */
 128  
     @JSFWebConfigParam(defaultValue="for JSF 2.0 since 1.1.11 false, otherwise true", 
 129  
             expectedValues="true, false, on, off, yes, no",since="1.1", ignoreUpperLowerCase=true,
 130  
             desc="Tomahawk specific: This parameter will check for a properly configured Extensions-Filter if " +
 131  
                  "it is needed by the web-app.", tags="tomahawk")
 132  
     private static final String  INIT_CHECK_EXTENSIONS_FILTER = "org.apache.myfaces.CHECK_EXTENSIONS_FILTER";
 133  
     private static final boolean INIT_CHECK_EXTENSIONS_FILTER_DEFAULT = false;
 134  
 
 135  
     /**
 136  
      * Tomahawk specific: Interpret "readonly" property as "disable" for select components like t:selectOneRow.
 137  
      */
 138  
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1", 
 139  
             ignoreUpperLowerCase=true, tags="tomahawk", group="render")
 140  
     private static final String INIT_READONLY_AS_DISABLED_FOR_SELECT = 
 141  
         "org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS";
 142  
     private static final boolean INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT = true;
 143  
 
 144  
     /**
 145  
      * Set the time in seconds that check for updates of web.xml and faces-config descriptors and 
 146  
      * refresh the configuration.
 147  
      * This param is valid only if project stage is not production. Set this param to 0 disable this feature.
 148  
      */
 149  
     @JSFWebConfigParam(defaultValue="2",since="1.1", classType="java.lang.Long")
 150  
     public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD = "org.apache.myfaces.CONFIG_REFRESH_PERIOD";
 151  
     public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT = 2;
 152  
 
 153  
     /**
 154  
      * Set the view state using a javascript function instead a hidden input field.
 155  
      */
 156  
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1", 
 157  
             ignoreUpperLowerCase=true, deprecated=true, group="state")
 158  
     private static final String  INIT_PARAM_VIEWSTATE_JAVASCRIPT = "org.apache.myfaces.VIEWSTATE_JAVASCRIPT";
 159  
     private static final boolean INIT_PARAM_VIEWSTATE_JAVASCRIPT_DEFAULT = false;
 160  
 
 161  
     /**
 162  
      * Define if the input field that should store the state (javax.faces.ViewState) should render 
 163  
      * id="javax.faces.ViewState".
 164  
      * 
 165  
      * JSF API 1.2 defines a "javax.faces.ViewState" client parameter, that must be rendered as both the "name"
 166  
      * and the "id" attribute of the hidden input that is rendered for the purpose of state saving
 167  
      * (see ResponseStateManager.VIEW_STATE_PARAM).
 168  
      * Actually this causes duplicate id attributes and thus invalid XHTML pages when multiple forms are rendered on
 169  
      * one page. With the org.apache.myfaces.RENDER_VIEWSTATE_ID context parameter you can tune this behaviour.
 170  
      * <br/>Set it to
 171  
      * <ul><li>true - to render JSF 1.2 compliant id attributes (that might cause invalid XHTML), or</li>
 172  
      * <li>false - to omit rendering of the id attribute (which is only needed for very special 
 173  
      * AJAX/Javascript components)</li></ul>
 174  
      * Default value is: true (for backwards compatibility and JSF 1.2 compliancy) 
 175  
      */
 176  
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1", 
 177  
             ignoreUpperLowerCase=true, group="state")
 178  
     private static final String  INIT_PARAM_RENDER_VIEWSTATE_ID = "org.apache.myfaces.RENDER_VIEWSTATE_ID";
 179  
     private static final boolean INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT = true;
 180  
 
 181  
     /**
 182  
      * Use "&amp;amp;" entity instead a plain "&amp;" character within HTML.
 183  
      * <p>W3C recommends to use the "&amp;amp;" entity instead of a plain "&amp;" character within HTML.
 184  
      * This also applies to attribute values and thus to the "href" attribute of &lt;a&gt; elements as well.
 185  
      * Even more, when XHTML is used as output the usage of plain "&amp;" characters is forbidden and would lead to
 186  
      * invalid XML code.
 187  
      * Therefore, since version 1.1.6 MyFaces renders the correct "&amp;amp;" entity for links.</p>
 188  
      * <p>The init parameter
 189  
      * org.apache.myfaces.STRICT_XHTML_LINKS makes it possible to restore the old behaviour and to make MyFaces
 190  
      * "bug compatible" to the Sun RI which renders plain "&amp;" chars in links as well.</p>
 191  
      * <p>
 192  
      * See: <a href="http://www.w3.org/TR/html401/charset.html#h-5.3.2">HTML 4.01 Specification</a>
 193  
      * See: <a href="http://issues.apache.org/jira/browse/MYFACES-1774">Jira: MYFACES-1774</a>
 194  
      * </p>
 195  
      */
 196  
     @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1.6", 
 197  
             ignoreUpperLowerCase=true, group="render")
 198  
     private static final String  INIT_PARAM_STRICT_XHTML_LINKS = "org.apache.myfaces.STRICT_XHTML_LINKS";
 199  
     private static final boolean INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT = true;
 200  
     
 201  
     /**
 202  
      * This param renders the clear javascript on button necessary only for
 203  
      * compatibility with hidden fields feature of myfaces. This is done 
 204  
      * because jsf ri does not render javascript on onclick method for button,
 205  
      * so myfaces should do this.
 206  
      */
 207  
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.3",
 208  
             ignoreUpperLowerCase=true, group="render")
 209  
     private static final String INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON = 
 210  
         "org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON";
 211  
     private static final boolean INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT= false;
 212  
 
 213  
     /**
 214  
      * This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used,
 215  
      * instead use javascript to create them. Set this param to true also enables 
 216  
      * org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON 
 217  
      * automatically to ensure consistency. This feature is required to support Windows Mobile 6, because in 
 218  
      * this environment, document.createElement() and form.appendChild() javascript methods are not supported.
 219  
      */
 220  
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.9",
 221  
             ignoreUpperLowerCase=true, group="render")
 222  
     private static final String INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS = 
 223  
         "org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS";
 224  
     private static final boolean INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT= false;
 225  
     
 226  
     /**
 227  
      * Add a code that save the form before submit using a
 228  
      * link (call to window.external.AutoCompleteSaveForm(form) ). It's a bug on IE.
 229  
      */
 230  
     @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
 231  
             ignoreUpperLowerCase=true, group="render")
 232  
     private static final String INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE = "org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE";
 233  
     private static final boolean INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT = false;
 234  
     
 235  
     /**
 236  
      * Define an alternate class name that will be used to initialize MyFaces, instead the default 
 237  
      * javax.faces.webapp.FacesServlet.
 238  
      * 
 239  
      * <p>This helps MyFaces to detect the mappings and other additional configuration used to setup the 
 240  
      * environment, and prevent abort initialization if no FacesServlet config is detected.
 241  
      * </p>
 242  
      */
 243  
     @JSFWebConfigParam(since="1.2.7")
 244  
     private static final String INIT_PARAM_DELEGATE_FACES_SERVLET = "org.apache.myfaces.DELEGATE_FACES_SERVLET";
 245  
 
 246  
     /**
 247  
      * Indicate if the facelet associated to the view should be reapplied when the view is refreshed.
 248  
      *  Default mode is "auto".
 249  
      * 
 250  
      * <p>This param is only valid when partial state saving is on.
 251  
      * If this is set as true, the tag-handlers are always reapplied before render view, like in facelets 1.1.x, 
 252  
      * allowing c:if work correctly to "toggle" components based on a value changed on invoke application phase. 
 253  
      * If the param is set as "auto", the implementation check if c:if, c:forEach, 
 254  
      * c:choose and ui:include with src=ELExpression is used on the page and if that so, mark the view
 255  
      * to be refreshed.</p> 
 256  
      */
 257  
     @JSFWebConfigParam(since="2.0", defaultValue="auto", expectedValues="true,false,auto", tags="performance", 
 258  
             ignoreUpperLowerCase=true, group="state")
 259  
     public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS = 
 260  
         "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS"; 
 261  
     public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT = "auto";
 262  
 
 263  
     /**
 264  
      * Enable or disable a special mode that enable full state for parent components containing c:if, c:forEach, 
 265  
      * c:choose and ui:include with src=ELExpression. By default is disabled(false).
 266  
      * 
 267  
      * <p>This param is only valid when partial state saving is on.
 268  
      * If this is set as true, parent components containing  c:if, c:forEach, 
 269  
      * c:choose and ui:include with src=ELExpression are marked to be restored fully, so state
 270  
      * is preserved between request.</p>
 271  
      */
 272  
     @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false, on, off, yes, no", 
 273  
             tags="performance", ignoreUpperLowerCase=true, group="state")
 274  
     public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE = 
 275  
         "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE";
 276  
     public final static boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT = false;
 277  
     
 278  
     /**
 279  
      * If set to <code>true</code>, tag library XML files and faces config XML files using schema 
 280  
      * will be validated during application start up
 281  
      */
 282  
     @JSFWebConfigParam(since="2.0", expectedValues="true, false, on, off, yes, no", ignoreUpperLowerCase=true)
 283  
     public final static String INIT_PARAM_VALIDATE_XML = "org.apache.myfaces.VALIDATE_XML";
 284  
     public final static boolean INIT_PARAM_VALIDATE_XML_DEFAULT = false;
 285  
     
 286  
     /**
 287  
      * Wrap content inside script with xml comment to prevent old browsers to display it. By default it is true. 
 288  
      */
 289  
     @JSFWebConfigParam(since="2.0.1", expectedValues="true, false, on, off, yes, no", defaultValue="false",
 290  
             ignoreUpperLowerCase=true, group="render")
 291  
     public final static String INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG = 
 292  
         "org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG";
 293  
     public final static boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT = false;
 294  
     
 295  
     /**
 296  
      * If set true, render the form submit script inline, as in myfaces core 1.2 and earlier versions 
 297  
      */
 298  
     @JSFWebConfigParam(since="2.0.2", expectedValues="true, false, on, off, yes, no", defaultValue="false", 
 299  
             ignoreUpperLowerCase=true, group="render")
 300  
     public final static String INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE = 
 301  
         "org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE";
 302  
     public final static boolean INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT = false;
 303  
     
 304  
     /**
 305  
      * Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder 
 306  
      * variables (submittedValue, localValue, value).
 307  
      * Note evaluate those getters for each component could cause some unwanted side effects when 
 308  
      * using "access" type scopes like on MyFaces CODI.
 309  
      * This param only has effect when project stage is Development.     
 310  
      */
 311  
     @JSFWebConfigParam(since="2.0.8")
 312  
     public final static String INIT_PARAM_DEBUG_PHASE_LISTENER = "org.apache.myfaces.DEBUG_PHASE_LISTENER";
 313  
     public final static boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT = false;
 314  
     
 315  
     /**
 316  
      * Detect if a target (usually head) should be update for the current view in an ajax render 
 317  
      * operation. This is activated if a css or js resource is added dynamically by effect of a refresh 
 318  
      * (c:if, ui:include src="#{...}" or a manipulation of the tree). This ensures ajax updates of content 
 319  
      * using ui:include will be consistent. Note this behavior is a myfaces specific extension, so to 
 320  
      * ensure strict compatibility with the spec, set this param to false (default false).
 321  
      */
 322  
     @JSFWebConfigParam(since="2.0.10", expectedValues="true, false", defaultValue="false")
 323  
     public final static String INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX = 
 324  
         "org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX";
 325  
     public final static boolean INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT = false;
 326  
     
 327  
     /**
 328  
      * Change default getType() behavior for composite component EL resolver, from return null 
 329  
      * (see JSF 2_0 spec section 5_6_2_2) to
 330  
      * use the metadata information added by composite:attribute, ensuring components working with 
 331  
      * chained EL expressions to find the
 332  
      * right type when a getType() is called over the source EL expression.
 333  
      * 
 334  
      * To ensure strict compatibility with the spec set this param to true (by default is false, 
 335  
      * so the change is enabled by default). 
 336  
      */
 337  
     @JSFWebConfigParam(since="2.0.10", expectedValues="true, false", defaultValue="false", group="EL")
 338  
     public final static String INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER = 
 339  
         "org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER";
 340  
     public final static boolean INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT = false;
 341  
     
 342  
     /**
 343  
      * Define the default content type that the default ResponseWriter generates, when no match can be derived from
 344  
      * HTTP Accept Header.
 345  
      */
 346  
     @JSFWebConfigParam(since="2.0.11,2.1.5", expectedValues="text/html, application/xhtml+xml", 
 347  
             defaultValue="text/html", group="render")
 348  
     public final static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE = 
 349  
         "org.apache.myfaces.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE";
 350  
     public final static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT = "text/html";
 351  
 
 352  
     /**
 353  
      * Enable or disable a cache used to "remember" the generated facelets unique ids and reduce 
 354  
      * the impact on memory usage, only active if javax.faces.FACELETS_REFRESH_PERIOD is -1 (no refresh).
 355  
      */
 356  
     @JSFWebConfigParam(defaultValue = "true", since = "2.0.13, 2.1.7", expectedValues="true, false", 
 357  
             group="viewhandler", tags="performance",
 358  
             desc="Enable or disable a cache used to 'remember'  the generated facelets unique ids " + 
 359  
                  "and reduce the impact over memory usage.")
 360  
     public static final String INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED = 
 361  
         "org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED";
 362  
     public static final boolean INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT = true;
 363  
     
 364  
     /**
 365  
      * Set the size of the cache used to store strings generated using SectionUniqueIdCounter
 366  
      * for component ids. If this is set to 0, no cache is used. By default is set to 100.
 367  
      */
 368  
     @JSFWebConfigParam(defaultValue = "100", since = "2.0.13, 2.1.7",
 369  
             group="viewhandler", tags="performance")
 370  
     public static final String INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE =
 371  
         "org.apache.myfaces.COMPONENT_UNIQUE_IDS_CACHE_SIZE";
 372  
     public static final int INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT = 100;
 373  
 
 374  
     /**
 375  
     * If set false, myfaces won't support JSP and javax.faces.el. JSP are deprecated in JSF 2.X, javax.faces.el in 
 376  
     * in JSF 1.2. Default value is true. 
 377  
     * 
 378  
     * If this property is set is false, JSF 1.1 VariableResolver and PropertyResolver config (replaced in JSF 1.2 by
 379  
     * ELResolver) and all related logic for JSP is skipped, making EL evaluation faster.  
 380  
     */
 381  
     @JSFWebConfigParam(since="2.0.13,2.1.7", expectedValues="true,false", defaultValue="true",
 382  
          desc="If set false, myfaces won't support JSP and javax.faces.el. JSP are deprecated in " +
 383  
          "JSF 2.X, javax.faces.el in in JSF 1.2. Default value is true.",
 384  
          group="EL", tags="performance ")
 385  
     public final static String INIT_PARAM_SUPPORT_JSP_AND_FACES_EL = "org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL";
 386  
     public final static boolean INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT = true;
 387  
     
 388  
     /**
 389  
      * When the application runs inside Google Application Engine container (GAE),
 390  
      * indicate which jar files should be scanned for files (faces-config, facelets taglib
 391  
      * or annotations). It accept simple wildcard patterns like myfavoritejsflib-*.jar or 
 392  
      * myfavoritejsflib-1.1.?.jar. By default, all the classpath is scanned for files 
 393  
      * annotations (so it adds an small delay on startup).
 394  
      */
 395  
     @JSFWebConfigParam(since = "2.1.8, 2.0.14", expectedValues="none, myfavoritejsflib-*.jar",
 396  
             tags="performance, GAE")
 397  
     public static final String INIT_PARAM_GAE_JSF_JAR_FILES = "org.apache.myfaces.GAE_JSF_JAR_FILES";
 398  1
     public final static String INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT = null;
 399  
 
 400  
     /**
 401  
      * When the application runs inside Google Application Engine container (GAE),
 402  
      * indicate which jar files should be scanned for annotations. This param overrides
 403  
      * org.apache.myfaces.GAE_JSF_JAR_FILES behavior that tries to find faces-config.xml or
 404  
      * files ending with .faces-config.xml in /META-INF folder and if that so, try to
 405  
      * find JSF annotations in the whole jar file. It accept simple wildcard patterns 
 406  
      * like myfavoritejsflib-*.jar or myfavoritejsflib-1.1.?.jar.
 407  
      * By default, all the classpath is scanned for annotations (so it adds an small
 408  
      * delay on startup).
 409  
      */
 410  
     @JSFWebConfigParam(since = "2.1.8, 2.0.14", expectedValues="none, myfavoritejsflib-*.jar",
 411  
             tags="performance, GAE")
 412  
     public static final String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES = 
 413  
             "org.apache.myfaces.GAE_JSF_ANNOTATIONS_JAR_FILES";
 414  1
     public final static String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT = null;
 415  
     
 416  
     /**
 417  
      * If this param is set to true, a check will be done in Restore View Phase to check
 418  
      * if the viewId exists or not and if it does not exists, a 404 response will be thrown.
 419  
      * 
 420  
      * This is applicable in cases where all the views in the application are generated by a 
 421  
      * ViewDeclarationLanguage implementation.
 422  
      */
 423  
     @JSFWebConfigParam(since = "2.1.13", defaultValue="false", expectedValues="true,false", 
 424  
             group="viewhandler")
 425  
     public static final String INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND = 
 426  
             "org.apache.myfaces.STRICT_JSF_2_VIEW_NOT_FOUND";
 427  
     public final static boolean INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT = false;
 428  
 
 429  
     @JSFWebConfigParam(defaultValue = "false", since = "2.2.0", expectedValues="true, false", group="render",
 430  
             tags="performance",
 431  
             desc="Enable or disable an early flush which allows to send e.g. the HTML-Head to the client " +
 432  
                     "while the rest gets rendered. It's a well known technique to reduce the time for loading a page.")
 433  
     private static final String INIT_PARAM_EARLY_FLUSH_ENABLED =
 434  
         "org.apache.myfaces.EARLY_FLUSH_ENABLED";
 435  
     private static final boolean INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT = false;
 436  
 
 437  
     @JSFWebConfigParam(defaultValue = "false", since = "2.2.0", expectedValues="true, false", group="cdi",
 438  
             tags="injection",
 439  
             desc="Enable or disable CDI support for converters.")
 440  
     private static final String INIT_PARAM_CDI_MANAGED_CONVERTERS_ENABLED =
 441  
         "org.apache.myfaces.CDI_MANAGED_CONVERTERS_ENABLED";
 442  
     private static final boolean INIT_PARAM_CDI_MANAGED_CONVERTERS_DEFAULT = false;
 443  
     @JSFWebConfigParam(defaultValue = "false", since = "2.2.0", expectedValues="true, false", group="cdi",
 444  
             tags="injection",
 445  
             desc="Enable or disable CDI support for validators.")
 446  
     private static final String INIT_PARAM_CDI_MANAGED_VALIDATORS_ENABLED =
 447  
         "org.apache.myfaces.CDI_MANAGED_VALIDATORS_ENABLED";
 448  
     private static final boolean INIT_PARAM_CDI_MANAGED_VALIDATORS_DEFAULT = false;
 449  
     
 450  
     /**
 451  
      * This param makes components like c:set, ui:param and templating components like ui:decorate,
 452  
      * ui:composition and ui:include to behave like the ones provided originally in facelets 1_1_x. 
 453  
      * See MYFACES-3810 for details.
 454  
      */
 455  
     @JSFWebConfigParam(since = "2.2.0", defaultValue="false", expectedValues="true,false", 
 456  
             group="viewhandler")
 457  
     public static final String INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY = 
 458  
             "org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY";
 459  
     public final static boolean INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT = false;    
 460  
     
 461  
     /**
 462  
      * This param makes h:form component to render the view state and other hidden fields
 463  
      * at the beginning of the form. This also includes component resources with target="form",
 464  
      * but it does not include legacy 1.1 myfaces specific hidden field adition.
 465  
      */
 466  
     @JSFWebConfigParam(since = "2.2.4", defaultValue = "false", expectedValues = "true,false",
 467  
             group="render")
 468  
     public static final String INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN =
 469  
             "org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN";
 470  
     public final static boolean INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT = false;
 471  
     
 472  
     /**
 473  
      * Defines whether flash scope is disabled, preventing add the Flash cookie to the response. 
 474  
      * 
 475  
      * <p>This is useful for applications that does not require to use flash scope, and instead uses other scopes.</p>
 476  
      */
 477  
     @JSFWebConfigParam(defaultValue="false",since="2.0.5")
 478  
     public static final String INIT_PARAM_FLASH_SCOPE_DISABLED = "org.apache.myfaces.FLASH_SCOPE_DISABLED";
 479  
     public static final boolean INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT = false;
 480  
     
 481  
     /**
 482  
      * Defines the amount (default = 20) of the latest views are stored in session.
 483  
      * 
 484  
      * <p>Only applicable if state saving method is "server" (= default).
 485  
      * </p>
 486  
      * 
 487  
      */
 488  
     @JSFWebConfigParam(defaultValue="20",since="1.1", classType="java.lang.Integer", group="state", tags="performance")
 489  
     public static final String INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION = "org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION";
 490  
 
 491  
     /**
 492  
      * Default value for <code>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</code> context parameter.
 493  
      */
 494  
     public static final int INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT = 20;    
 495  
 
 496  
     /**
 497  
      * Indicates the amount of views (default is not active) that should be stored in session between sequential
 498  
      * POST or POST-REDIRECT-GET if org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION is true.
 499  
      * 
 500  
      * <p>Only applicable if state saving method is "server" (= default). For example, if this param has value = 2 and 
 501  
      * in your custom webapp there is a form that is clicked 3 times, only 2 views
 502  
      * will be stored and the third one (the one stored the first time) will be
 503  
      * removed from session, even if the view can
 504  
      * store more sessions org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION.
 505  
      * This feature becomes useful for multi-window applications.
 506  
      * where without this feature a window can swallow all view slots so
 507  
      * the other ones will throw ViewExpiredException.</p>
 508  
      */
 509  
     @JSFWebConfigParam(since="2.0.6", classType="java.lang.Integer", group="state", tags="performance", 
 510  
             defaultValue = "4")
 511  
     public static final String INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
 512  
             = "org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION";
 513  1
     public static final Integer INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT = 4;
 514  
     
 515  
     /**
 516  
      * Indicate the max number of flash tokens stored into session. It is only active when 
 517  
      * javax.faces.CLIENT_WINDOW_MODE is enabled and javax.faces.STATE_SAVING_METHOD is set
 518  
      * to "server". Each flash token is associated to one client window id at
 519  
      * the same time, so this param is related to the limit of active client windows per session. 
 520  
      * By default is the same number as in 
 521  
      * (org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION / 
 522  
      * org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION) + 1 = 6.
 523  
      */
 524  
     @JSFWebConfigParam(since="2.2.6", group="state", tags="performance")
 525  
     static final String INIT_PARAM_NUMBER_OF_FLASH_TOKENS_IN_SESSION = 
 526  
             "org.apache.myfaces.NUMBER_OF_FLASH_TOKENS_IN_SESSION";
 527  
     
 528  
     /**
 529  
      * Indicate the max number of client window ids stored into session by faces flow. It is only active when 
 530  
      * javax.faces.CLIENT_WINDOW_MODE is enabled and javax.faces.STATE_SAVING_METHOD is set
 531  
      * to "server". This param is related to the limit of active client 
 532  
      * windows per session, and it is used to cleanup flow scope beans when a client window or view becomes 
 533  
      * invalid. 
 534  
      * By default is the same number as in 
 535  
      * (org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION / 
 536  
      * org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION) + 1 = 6.
 537  
      */
 538  
     @JSFWebConfigParam(since="2.2.6", group="state", tags="performance")
 539  
     static final String INIT_PARAM_NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION = 
 540  
             "org.apache.myfaces.FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION";
 541  
     
 542  
     /**
 543  
      * This parameter specifies whether or not the ImportHandler will be supported
 544  
      */
 545  
     @JSFWebConfigParam(since="2.2.9", defaultValue="false", expectedValues="true,false", group="EL")
 546  
     protected static final String SUPPORT_EL_3_IMPORT_HANDLER = "org.apache.myfaces.SUPPORT_EL_3_IMPORT_HANDLER";
 547  
     public final static boolean SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT = false;
 548  
 
 549  
     /**
 550  
      * This parameter specifies whether or not the Origin header app path should be checked 
 551  
      */
 552  
     @JSFWebConfigParam(since="2.2.13", defaultValue="false", expectedValues="true,false")
 553  
     protected static final String STRICT_JSF_2_ORIGIN_HEADER_APP_PATH = 
 554  
             "org.apache.myfaces.STRICT_JSF_2_ORIGIN_HEADER_APP_PATH";
 555  
     public final static boolean STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT = false;
 556  
 
 557  
     /**
 558  
      * Defines if a session should be created (if one does not exist) before response rendering.
 559  
      * When this parameter is set to true, a session will be created even when client side state 
 560  
      * saving or stateless views are used, which can lead to unintended resource consumption.
 561  
      * When this parameter is set to false, a session will only be created before response 
 562  
      * rendering if a view is not transient and server side state saving is in use.
 563  
      */
 564  
     @JSFWebConfigParam(since="2.2.13", defaultValue="true", expectedValues="true,false")
 565  
     protected static final String ALWAYS_FORCE_SESSION_CREATION = 
 566  
             "org.apache.myfaces.ALWAYS_FORCE_SESSION_CREATION";
 567  
     public final static boolean ALWAYS_FORCE_SESSION_CREATION_DEFAULT = true;
 568  
 
 569  
 
 570  
     private boolean _prettyHtml;
 571  
     private boolean _detectJavascript;
 572  
     private boolean _allowJavascript;
 573  
     private boolean _autoScroll;
 574  
     private String _addResourceClass;
 575  
     private String _resourceVirtualPath;
 576  
     private boolean _checkExtensionsFilter;
 577  
     private boolean _readonlyAsDisabledForSelect;
 578  
     private long _configRefreshPeriod;
 579  
     private boolean _viewStateJavascript;
 580  
     private boolean _renderViewStateId;
 581  
     private boolean _strictXhtmlLinks;
 582  
     private boolean _renderClearJavascriptOnButton;
 583  
     private boolean renderHiddenFieldsForLinkParams;
 584  
     private boolean _saveFormSubmitLinkIE;
 585  
     private String _delegateFacesServlet;
 586  
     private boolean _refreshTransientBuildOnPSS;
 587  
     private boolean _refreshTransientBuildOnPSSAuto;
 588  
     private boolean refreshTransientBuildOnPSSPreserveState;
 589  
     private boolean _validateXML;
 590  
     private boolean _wrapScriptContentWithXmlCommentTag;
 591  
     private boolean _renderFormSubmitScriptInline;
 592  
     private boolean _debugPhaseListenerEnabled;
 593  
     private boolean _strictJsf2RefreshTargetAjax;
 594  
     private boolean _strictJsf2CCELResolver;
 595  
     private String _defaultResponseWriterContentTypeMode;
 596  
     private boolean _viewUniqueIdsCacheEnabled;
 597  
     private int _componentUniqueIdsCacheSize;
 598  
     private boolean _supportJSPAndFacesEL;
 599  
     private String _gaeJsfJarFiles;
 600  
     private String _gaeJsfAnnotationsJarFiles;
 601  
     private boolean _strictJsf2ViewNotFound;
 602  
     private boolean _earlyFlushEnabled;
 603  
     private boolean _cdiManagedConvertersEnabled;
 604  
     private boolean _cdiManagedValidatorsEnabled;
 605  
     private boolean _strictJsf2FaceletsCompatibility;
 606  
     private boolean _renderFormViewStateAtBegin;
 607  
     private boolean _flashScopeDisabled;
 608  
     private Integer _numberOfViewsInSession;
 609  
     private Integer _numberOfSequentialViewsInSession;
 610  
     private Integer _numberOfFlashTokensInSession;
 611  
     private Integer _numberOfFacesFlowClientWindowIdsInSession;
 612  
     private boolean _supportEL3ImportHandler;
 613  
     private boolean _strictJsf2OriginHeaderAppPath;
 614  
     private boolean _alwaysForceSessionCreation;
 615  
 
 616  
     private static final boolean TOMAHAWK_AVAILABLE;
 617  
     private static final boolean MYFACES_IMPL_AVAILABLE;
 618  
     private static final boolean RI_IMPL_AVAILABLE;
 619  
 
 620  
     static
 621  
     {
 622  
         boolean tomahawkAvailable;
 623  
         try
 624  
         {
 625  1
             ClassUtils.classForName("org.apache.myfaces.webapp.filter.ExtensionsFilter");
 626  0
             tomahawkAvailable = true;
 627  
         }
 628  1
         catch (ClassNotFoundException e)
 629  
         {
 630  1
             tomahawkAvailable = false;
 631  0
         }
 632  1
         TOMAHAWK_AVAILABLE = tomahawkAvailable;
 633  
     }
 634  
 
 635  
     static
 636  
     {
 637  
         boolean myfacesImplAvailable;
 638  
         try
 639  
         {
 640  1
             ClassUtils.classForName("org.apache.myfaces.application.ApplicationImpl");
 641  0
             myfacesImplAvailable = true;
 642  
         }
 643  1
         catch (ClassNotFoundException e)
 644  
         {
 645  1
             myfacesImplAvailable = false;
 646  0
         }
 647  1
         MYFACES_IMPL_AVAILABLE = myfacesImplAvailable;
 648  
     }
 649  
 
 650  
     static
 651  
     {
 652  
         boolean riImplAvailable;
 653  
         try
 654  
         {
 655  1
             ClassUtils.classForName("com.sun.faces.application.ApplicationImpl");
 656  0
             riImplAvailable = true;
 657  
         }
 658  1
         catch (ClassNotFoundException e)
 659  
         {
 660  1
             riImplAvailable = false;
 661  0
         }
 662  1
         RI_IMPL_AVAILABLE = riImplAvailable;
 663  1
     }
 664  
 
 665  
     public static MyfacesConfig getCurrentInstance(ExternalContext extCtx)
 666  
     {
 667  26
         MyfacesConfig myfacesConfig = (MyfacesConfig) extCtx
 668  
                 .getApplicationMap().get(APPLICATION_MAP_PARAM_NAME);
 669  26
         if (myfacesConfig == null)
 670  
         {
 671  
 
 672  26
             myfacesConfig = createAndInitializeMyFacesConfig(extCtx);
 673  
 
 674  26
             extCtx.getApplicationMap().put(APPLICATION_MAP_PARAM_NAME, myfacesConfig);
 675  
 
 676  
         }
 677  
 
 678  26
         return myfacesConfig;
 679  
     }
 680  
     
 681  
     public MyfacesConfig()
 682  26
     {
 683  26
         setPrettyHtml(INIT_PARAM_PRETTY_HTML_DEFAULT);
 684  26
         setAllowJavascript(INIT_PARAM_ALLOW_JAVASCRIPT_DEFAULT);
 685  26
         setRenderClearJavascriptOnButton(INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT);
 686  26
         setRenderHiddenFieldsForLinkParams(INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT);
 687  26
         setSaveFormSubmitLinkIE(INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT);
 688  26
         setReadonlyAsDisabledForSelect(INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT);
 689  26
         setRenderViewStateId(INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT);
 690  26
         setStrictXhtmlLinks(INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT);
 691  26
         setConfigRefreshPeriod(INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT);        
 692  26
         setViewStateJavascript(INIT_PARAM_VIEWSTATE_JAVASCRIPT_DEFAULT);        
 693  26
         setRefreshTransientBuildOnPSS(true);
 694  26
         setRefreshTransientBuildOnPSSAuto(true);
 695  26
         setRefreshTransientBuildOnPSSPreserveState(INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT);
 696  26
         setValidateXML(INIT_PARAM_VALIDATE_XML_DEFAULT);
 697  26
         setWrapScriptContentWithXmlCommentTag(INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT);
 698  26
         setDetectJavascript(INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT);
 699  26
         setAutoScroll(INIT_PARAM_AUTO_SCROLL_DEFAULT);
 700  26
         setAddResourceClass(INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT);
 701  26
         setResourceVirtualPath(INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT);
 702  
         //The default is true but we'll let it false because it depends if 
 703  
         //tomahawk is on classpath and no test environment is set
 704  26
         setCheckExtensionsFilter(false);
 705  26
         setRenderFormSubmitScriptInline(INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT);
 706  26
         setDebugPhaseListenerEnabled(INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT);
 707  26
         setStrictJsf2RefreshTargetAjax(INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT);
 708  26
         setStrictJsf2CCELResolver(INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT);
 709  26
         setDefaultResponseWriterContentTypeMode(INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT);
 710  26
         setViewUniqueIdsCacheEnabled(INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT);
 711  26
         setComponentUniqueIdsCacheSize(INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT);
 712  26
         setSupportJSPAndFacesEL(INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT);
 713  26
         setGaeJsfJarFiles(INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT);
 714  26
         setGaeJsfAnnotationsJarFiles(INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT);
 715  26
         setStrictJsf2ViewNotFound(INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT);
 716  26
         setEarlyFlushEnabled(INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT);
 717  26
         setCdiManagedConvertersEnabled(INIT_PARAM_CDI_MANAGED_CONVERTERS_DEFAULT);
 718  26
         setCdiManagedValidatorsEnabled(INIT_PARAM_CDI_MANAGED_VALIDATORS_DEFAULT);
 719  26
         setStrictJsf2FaceletsCompatibility(INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT);
 720  26
         setRenderFormViewStateAtBegin(INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT);
 721  26
         setFlashScopeDisabled(INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT);
 722  26
         setNumberOfViewsInSession(INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
 723  26
         setNumberOfSequentialViewsInSession(INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
 724  26
         setNumberOfFlashTokensInSession(
 725  
                 (INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT / 
 726  
                         INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT)+1);
 727  26
         setSupportEL3ImportHandler(SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT);
 728  26
         setStrictJsf2OriginHeaderAppPath(STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT);
 729  26
         setAlwaysForceSessionCreation(ALWAYS_FORCE_SESSION_CREATION_DEFAULT);
 730  26
     }
 731  
 
 732  
     private static MyfacesConfig createAndInitializeMyFacesConfig(ExternalContext extCtx)
 733  
     {
 734  
         
 735  26
         MyfacesConfig myfacesConfig = new MyfacesConfig();
 736  
 
 737  26
         myfacesConfig.setPrettyHtml(getBooleanInitParameter(extCtx, INIT_PARAM_PRETTY_HTML,
 738  
                                                             INIT_PARAM_PRETTY_HTML_DEFAULT));
 739  26
         myfacesConfig.setAllowJavascript(getBooleanInitParameter(extCtx, INIT_PARAM_ALLOW_JAVASCRIPT,
 740  
                                                                  INIT_PARAM_ALLOW_JAVASCRIPT_DEFAULT));
 741  
 
 742  26
         myfacesConfig.setRenderClearJavascriptOnButton(getBooleanInitParameter(extCtx, 
 743  
                                                             INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON,
 744  
                                                             INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT));
 745  
 
 746  26
         myfacesConfig.setRenderHiddenFieldsForLinkParams(getBooleanInitParameter(extCtx, 
 747  
                 INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS,
 748  
                 INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT));
 749  
 
 750  26
         myfacesConfig.setSaveFormSubmitLinkIE(getBooleanInitParameter(extCtx, INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE,
 751  
                                                             INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT));
 752  
         
 753  26
         myfacesConfig.setReadonlyAsDisabledForSelect(getBooleanInitParameter(extCtx, 
 754  
                                                                  INIT_READONLY_AS_DISABLED_FOR_SELECT,
 755  
                                                                  INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT));
 756  26
         myfacesConfig.setRenderViewStateId(getBooleanInitParameter(extCtx, INIT_PARAM_RENDER_VIEWSTATE_ID,
 757  
                                                                    INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT));
 758  26
         myfacesConfig.setStrictXhtmlLinks(getBooleanInitParameter(extCtx, INIT_PARAM_STRICT_XHTML_LINKS,
 759  
                                                                   INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT));
 760  26
         myfacesConfig.setRenderFormSubmitScriptInline(getBooleanInitParameter(extCtx,
 761  
                                                                   INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE,
 762  
                                                                   INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT));
 763  
         
 764  26
         myfacesConfig.setConfigRefreshPeriod(getLongInitParameter(extCtx, INIT_PARAM_CONFIG_REFRESH_PERIOD,
 765  
                 INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT));
 766  
 
 767  26
         myfacesConfig.setViewStateJavascript(getBooleanInitParameter(extCtx, INIT_PARAM_VIEWSTATE_JAVASCRIPT,
 768  
                 INIT_PARAM_VIEWSTATE_JAVASCRIPT_DEFAULT));
 769  
 
 770  26
         myfacesConfig.setDelegateFacesServlet(extCtx.getInitParameter(INIT_PARAM_DELEGATE_FACES_SERVLET));
 771  
         
 772  26
         String refreshTransientBuildOnPSS = getStringInitParameter(extCtx, 
 773  
                 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, 
 774  
                 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT);
 775  
         
 776  26
         if (refreshTransientBuildOnPSS == null)
 777  
         {
 778  0
             myfacesConfig.setRefreshTransientBuildOnPSS(false);
 779  0
             myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
 780  
         }
 781  26
         else if ("auto".equalsIgnoreCase(refreshTransientBuildOnPSS))
 782  
         {
 783  26
             myfacesConfig.setRefreshTransientBuildOnPSS(true);
 784  26
             myfacesConfig.setRefreshTransientBuildOnPSSAuto(true);
 785  
         }
 786  0
         else if (refreshTransientBuildOnPSS.equalsIgnoreCase("true") || 
 787  
                 refreshTransientBuildOnPSS.equalsIgnoreCase("on") || 
 788  
                 refreshTransientBuildOnPSS.equalsIgnoreCase("yes"))
 789  
         {
 790  0
             myfacesConfig.setRefreshTransientBuildOnPSS(true);
 791  0
             myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
 792  
         }
 793  
         else
 794  
         {
 795  0
             myfacesConfig.setRefreshTransientBuildOnPSS(false);
 796  0
             myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
 797  
         }
 798  
         
 799  26
         myfacesConfig.setRefreshTransientBuildOnPSSPreserveState(getBooleanInitParameter(extCtx,
 800  
                 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE, 
 801  
                 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT));
 802  
         
 803  26
         myfacesConfig.setValidateXML(getBooleanInitParameter(extCtx, INIT_PARAM_VALIDATE_XML, 
 804  
                 INIT_PARAM_VALIDATE_XML_DEFAULT));
 805  
         
 806  26
         myfacesConfig.setWrapScriptContentWithXmlCommentTag(getBooleanInitParameter(extCtx, 
 807  
                 INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG, 
 808  
                 INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT));
 809  
         
 810  26
         myfacesConfig.setDebugPhaseListenerEnabled(getBooleanInitParameter(extCtx, INIT_PARAM_DEBUG_PHASE_LISTENER,
 811  
                 INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT));
 812  
         
 813  26
         myfacesConfig.setStrictJsf2RefreshTargetAjax(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 814  
                 INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX, INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT));
 815  
         
 816  26
         myfacesConfig.setStrictJsf2CCELResolver(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 817  
                 INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER, INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT));
 818  
         
 819  26
         myfacesConfig.setDefaultResponseWriterContentTypeMode(WebConfigParamUtils.getStringInitParameter(
 820  
                 extCtx, INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE,
 821  
                 INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT));
 822  
 
 823  26
         myfacesConfig.setViewUniqueIdsCacheEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 824  
                 INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED, INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT));
 825  26
         myfacesConfig.setComponentUniqueIdsCacheSize(
 826  
                 WebConfigParamUtils.getIntegerInitParameter(extCtx,
 827  
                 INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE, 
 828  
                 INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT));
 829  26
         myfacesConfig.setSupportJSPAndFacesEL(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 830  
                 INIT_PARAM_SUPPORT_JSP_AND_FACES_EL, INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT));
 831  
         
 832  26
         myfacesConfig.setGaeJsfJarFiles(WebConfigParamUtils.getStringInitParameter(extCtx, 
 833  
                 INIT_PARAM_GAE_JSF_JAR_FILES, INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT));
 834  26
         myfacesConfig.setGaeJsfAnnotationsJarFiles(WebConfigParamUtils.getStringInitParameter(extCtx, 
 835  
                 INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES, INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT));
 836  
 
 837  26
         myfacesConfig.setStrictJsf2ViewNotFound(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 838  
                 INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND, INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT));
 839  
         
 840  26
         myfacesConfig.setEarlyFlushEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
 841  
                 INIT_PARAM_EARLY_FLUSH_ENABLED, INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT));
 842  
 
 843  26
         myfacesConfig.setCdiManagedConvertersEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
 844  
                 INIT_PARAM_CDI_MANAGED_CONVERTERS_ENABLED, INIT_PARAM_CDI_MANAGED_CONVERTERS_DEFAULT));
 845  26
         myfacesConfig.setCdiManagedValidatorsEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
 846  
                 INIT_PARAM_CDI_MANAGED_VALIDATORS_ENABLED, INIT_PARAM_CDI_MANAGED_VALIDATORS_DEFAULT));
 847  
 
 848  26
         myfacesConfig.setStrictJsf2FaceletsCompatibility(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 849  
                 INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY, 
 850  
                 INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT));
 851  
         
 852  26
         myfacesConfig.setRenderFormViewStateAtBegin(WebConfigParamUtils.getBooleanInitParameter(extCtx,
 853  
                 INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN,
 854  
                 INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT));
 855  
         
 856  26
         myfacesConfig.setFlashScopeDisabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
 857  
                 INIT_PARAM_FLASH_SCOPE_DISABLED,
 858  
                 INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT));
 859  
         
 860  
         try
 861  
         {
 862  26
             myfacesConfig.setNumberOfSequentialViewsInSession(WebConfigParamUtils.getIntegerInitParameter(
 863  
                     extCtx, 
 864  
                     INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION,
 865  
                     INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT));
 866  26
             Integer views = myfacesConfig.getNumberOfSequentialViewsInSession();
 867  26
             if (views == null || views < 0)
 868  
             {
 869  0
                 Logger.getLogger(MyfacesConfig.class.getName()).severe(
 870  
                         "Configured value for " + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
 871  
                           + " is not valid, must be an value >= 0, using default value ("
 872  
                           + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
 873  0
                 views = INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT;
 874  
             }
 875  
         }
 876  0
         catch (Throwable e)
 877  
         {
 878  0
             Logger.getLogger(MyfacesConfig.class.getName()).log(Level.SEVERE, "Error determining the value for "
 879  
                    + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
 880  
                    + ", expected an integer value > 0, using default value ("
 881  
                    + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
 882  26
         }        
 883  
         try
 884  
         {
 885  26
             myfacesConfig.setNumberOfViewsInSession(WebConfigParamUtils.getIntegerInitParameter(
 886  
                         extCtx, 
 887  
                         INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION,
 888  
                         INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT));
 889  26
             Integer views = myfacesConfig.getNumberOfViewsInSession();
 890  26
             if (views == null || views <= 0)
 891  
             {
 892  0
                 Logger.getLogger(MyfacesConfig.class.getName()).severe(
 893  
                         "Configured value for " + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION
 894  
                           + " is not valid, must be an value > 0, using default value ("
 895  
                           + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
 896  0
                 views = INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
 897  
             }
 898  
         }
 899  0
         catch (Throwable e)
 900  
         {
 901  0
             Logger.getLogger(MyfacesConfig.class.getName()).log(Level.SEVERE, "Error determining the value for "
 902  
                    + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION
 903  
                    + ", expected an integer value > 0, using default value ("
 904  
                    + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
 905  26
         }
 906  
 
 907  
         Integer numberOfFlashTokensInSessionDefault;
 908  26
         Integer i = myfacesConfig.getNumberOfSequentialViewsInSession();
 909  26
         int j = myfacesConfig.getNumberOfViewsInSession();
 910  26
         if (i != null && i.intValue() > 0)
 911  
         {
 912  26
             numberOfFlashTokensInSessionDefault = (j / i.intValue()) + 1;
 913  
         }
 914  
         else
 915  
         {
 916  0
             numberOfFlashTokensInSessionDefault = j + 1;
 917  
         }
 918  26
         myfacesConfig.setNumberOfFlashTokensInSession(WebConfigParamUtils.getIntegerInitParameter(
 919  
                         extCtx, 
 920  
                         INIT_PARAM_NUMBER_OF_FLASH_TOKENS_IN_SESSION, numberOfFlashTokensInSessionDefault));
 921  26
         myfacesConfig.setNumberOfFacesFlowClientWindowIdsInSession(WebConfigParamUtils.getIntegerInitParameter(
 922  
                         extCtx, 
 923  
                         INIT_PARAM_NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION, 
 924  
                         numberOfFlashTokensInSessionDefault));
 925  
                         
 926  26
         myfacesConfig.setSupportEL3ImportHandler(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 927  
                        SUPPORT_EL_3_IMPORT_HANDLER, 
 928  
                        SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT)); 
 929  
 
 930  26
         myfacesConfig.setStrictJsf2OriginHeaderAppPath(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 931  
                         STRICT_JSF_2_ORIGIN_HEADER_APP_PATH, 
 932  
                         STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT));
 933  
 
 934  26
         myfacesConfig.setAlwaysForceSessionCreation(WebConfigParamUtils.getBooleanInitParameter(extCtx, 
 935  
                         ALWAYS_FORCE_SESSION_CREATION, 
 936  
                         ALWAYS_FORCE_SESSION_CREATION_DEFAULT));
 937  
         
 938  26
         if (TOMAHAWK_AVAILABLE)
 939  
         {
 940  0
             myfacesConfig.setDetectJavascript(getBooleanInitParameter(extCtx, INIT_PARAM_DETECT_JAVASCRIPT,
 941  
                     INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT));
 942  0
             myfacesConfig.setAutoScroll(getBooleanInitParameter(extCtx, INIT_PARAM_AUTO_SCROLL,
 943  
                     INIT_PARAM_AUTO_SCROLL_DEFAULT));
 944  
                         
 945  0
             myfacesConfig.setAddResourceClass(getStringInitParameter(extCtx, INIT_PARAM_ADD_RESOURCE_CLASS,
 946  
                     INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT));
 947  0
             myfacesConfig.setResourceVirtualPath(getStringInitParameter(extCtx, INIT_PARAM_RESOURCE_VIRTUAL_PATH,
 948  
                     INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT));
 949  
 
 950  0
             myfacesConfig.setCheckExtensionsFilter(getBooleanInitParameter(extCtx, INIT_CHECK_EXTENSIONS_FILTER,
 951  
                     INIT_CHECK_EXTENSIONS_FILTER_DEFAULT));
 952  
             /*
 953  
             if(RI_IMPL_AVAILABLE)
 954  
             {
 955  
                 if(log.isLoggable(Level.INFO))
 956  
                 {
 957  
                     log.info("Starting up Tomahawk on the RI-JSF-Implementation.");
 958  
                 }
 959  
             }
 960  
 
 961  
             if(MYFACES_IMPL_AVAILABLE)
 962  
             {
 963  
                 if(log.isLoggable(Level.INFO))
 964  
                 {
 965  
                     log.info("Starting up Tomahawk on the MyFaces-JSF-Implementation");
 966  
                 }
 967  
             }*/
 968  
         }
 969  
         /*
 970  
         else
 971  
         {
 972  
             if (log.isLoggable(Level.INFO))
 973  
             {
 974  
                 log.info("Tomahawk jar not available. Autoscrolling, DetectJavascript, "+
 975  
                 "AddResourceClass and CheckExtensionsFilter are disabled now.");
 976  
             }
 977  
         }*/
 978  
 
 979  
         /*
 980  
         if(RI_IMPL_AVAILABLE && MYFACES_IMPL_AVAILABLE)
 981  
         {
 982  
             log.severe("Both MyFaces and the RI are on your classpath. Please make sure to"+
 983  
             " use only one of the two JSF-implementations.");
 984  
         }*/
 985  26
         return myfacesConfig;
 986  
     }
 987  
 
 988  
     private static boolean getBooleanInitParameter(ExternalContext externalContext,
 989  
                                                    String paramName,
 990  
                                                    boolean defaultValue)
 991  
     {
 992  364
         String strValue = externalContext.getInitParameter(paramName);
 993  364
         if (strValue == null)
 994  
         {
 995  
             //if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" + 
 996  
             // paramName + "' found, using default value " + defaultValue);
 997  364
             return defaultValue;
 998  
         }
 999  0
         else if (strValue.equalsIgnoreCase("true") || strValue.equalsIgnoreCase("on") || 
 1000  
                 strValue.equalsIgnoreCase("yes"))
 1001  
         {
 1002  0
             return true;
 1003  
         }
 1004  0
         else if (strValue.equalsIgnoreCase("false") || strValue.equalsIgnoreCase("off") || 
 1005  
                 strValue.equalsIgnoreCase("no"))
 1006  
         {
 1007  0
             return false;
 1008  
         }
 1009  
         else
 1010  
         {
 1011  
             //if (log.isLoggable(Level.WARNING)) log.warning("Wrong context init parameter '" + 
 1012  
             //paramName + "' (='" + strValue + "'), using default value " + defaultValue);
 1013  0
             return defaultValue;
 1014  
         }
 1015  
     }
 1016  
 
 1017  
     private static String getStringInitParameter(ExternalContext externalContext,
 1018  
                                                  String paramName,
 1019  
                                                  String defaultValue)
 1020  
     {
 1021  26
         String strValue = externalContext.getInitParameter(paramName);
 1022  26
         if (strValue == null)
 1023  
         {
 1024  
             //if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" + paramName +
 1025  
             //"' found, using default value " + defaultValue); //defaultValue==null should not be 
 1026  
             //a problem here
 1027  26
             return defaultValue;
 1028  
         }
 1029  
         
 1030  0
         return strValue;
 1031  
     }
 1032  
 
 1033  
     private static long getLongInitParameter(ExternalContext externalContext,
 1034  
                                                   String paramName,
 1035  
                                                   long defaultValue)
 1036  
     {
 1037  26
        String strValue = externalContext.getInitParameter(paramName);
 1038  26
        if (strValue == null)
 1039  
        {
 1040  
            //if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" +paramName +
 1041  
            //"' found, using default value " +defaultValue);
 1042  26
            return defaultValue;
 1043  
        }
 1044  
        else
 1045  
        {
 1046  
            try
 1047  
            {
 1048  0
                return Long.parseLong(strValue);
 1049  
            }
 1050  0
            catch (NumberFormatException e)
 1051  
            {
 1052  
                //if (log.isLoggable(Level.WARNING)) log.warning("Wrong context init parameter '" +
 1053  
                //paramName + "' (='" + strValue + "'), using default value " + defaultValue);
 1054  
            }
 1055  0
            return defaultValue;
 1056  
        }
 1057  
     }
 1058  
         
 1059  
      private void setResourceVirtualPath( String resourceVirtualPath )
 1060  
      {
 1061  26
          this._resourceVirtualPath = resourceVirtualPath;
 1062  26
     }
 1063  
 
 1064  
      public String getResourceVirtualPath()
 1065  
      {
 1066  0
          return this._resourceVirtualPath;
 1067  
      }
 1068  
 
 1069  
     public boolean isPrettyHtml()
 1070  
     {
 1071  0
         return _prettyHtml;
 1072  
     }
 1073  
 
 1074  
     private void setPrettyHtml(boolean prettyHtml)
 1075  
     {
 1076  52
         _prettyHtml = prettyHtml;
 1077  52
     }
 1078  
 
 1079  
     public boolean isDetectJavascript()
 1080  
     {
 1081  0
         return _detectJavascript;
 1082  
     }
 1083  
 
 1084  
     private void setDetectJavascript(boolean detectJavascript)
 1085  
     {
 1086  26
         _detectJavascript = detectJavascript;
 1087  26
     }
 1088  
 
 1089  
     private void setReadonlyAsDisabledForSelect(boolean readonlyAsDisabledForSelect)
 1090  
     {
 1091  52
         _readonlyAsDisabledForSelect = readonlyAsDisabledForSelect;
 1092  52
     }
 1093  
 
 1094  
     public boolean isReadonlyAsDisabledForSelect()
 1095  
     {
 1096  0
         return _readonlyAsDisabledForSelect;
 1097  
     }
 1098  
 
 1099  
 
 1100  
    public long getConfigRefreshPeriod()
 1101  
    {
 1102  0
        return _configRefreshPeriod;
 1103  
    }
 1104  
 
 1105  
    public void setConfigRefreshPeriod(long configRefreshPeriod)
 1106  
    {
 1107  52
        _configRefreshPeriod = configRefreshPeriod;
 1108  52
    }
 1109  
 
 1110  
     /**
 1111  
      * JSF API 1.2 defines a "javax.faces.ViewState" client parameter, that must be rendered as both the "name"
 1112  
      * and the "id" attribute of the hidden input that is rendered for the purpose of state saving
 1113  
      * (see ResponseStateManager.VIEW_STATE_PARAM).
 1114  
      * Actually this causes duplicate id attributes and thus invalid XHTML pages when multiple forms are rendered on
 1115  
      * one page. With the {@link #INIT_PARAM_RENDER_VIEWSTATE_ID} context parameter you can tune this behaviour.
 1116  
      * <br/>Set it to
 1117  
      * <ul><li>true - to render JSF 1.2 compliant id attributes (that might cause invalid XHTML), or</li>
 1118  
      * <li>false - to omit rendering of the id attribute (which is only needed for very special AJAX/Javascript 
 1119  
      * components)</li></ul>
 1120  
      * Default value is: true (for backwards compatibility and JSF 1.2 compliancy) 
 1121  
      * @return true, if the client state hidden input "javax.faces.ViewState" id attribute should be rendered
 1122  
      */
 1123  
     public boolean isRenderViewStateId()
 1124  
     {
 1125  0
         return _renderViewStateId;
 1126  
     }
 1127  
 
 1128  
     public void setRenderViewStateId(boolean renderViewStateId)
 1129  
     {
 1130  52
         _renderViewStateId = renderViewStateId;
 1131  52
     }
 1132  
 
 1133  
     /**
 1134  
      * <p>W3C recommends to use the "&amp;amp;" entity instead of a plain "&amp;" character within HTML.
 1135  
      * This also applies to attribute values and thus to the "href" attribute of &lt;a&gt; elements as well.
 1136  
      * Even more, when XHTML is used as output the usage of plain "&amp;" characters is forbidden and would lead to
 1137  
      * invalid XML code.
 1138  
      * Therefore, since version 1.1.6 MyFaces renders the correct "&amp;amp;" entity for links.</p>
 1139  
      * <p>The init parameter
 1140  
      * {@link #INIT_PARAM_STRICT_XHTML_LINKS} makes it possible to restore the old behaviour and to make MyFaces
 1141  
      * "bug compatible" to the Sun RI which renders plain "&amp;" chars in links as well.</p>
 1142  
      * @see <a href="http://www.w3.org/TR/html401/charset.html#h-5.3.2">HTML 4.01 Specification</a>
 1143  
      * @see <a href="http://issues.apache.org/jira/browse/MYFACES-1774">Jira: MYFACES-1774</a>
 1144  
      * @return true if ampersand characters ("&amp;") should be correctly rendered as "&amp;amp;" entities 
 1145  
      *         within link urls (=default), false for old (XHTML incompatible) behaviour
 1146  
      */
 1147  
     public boolean isStrictXhtmlLinks()
 1148  
     {
 1149  0
         return _strictXhtmlLinks;
 1150  
     }
 1151  
 
 1152  
     public void setStrictXhtmlLinks(boolean strictXhtmlLinks)
 1153  
     {
 1154  52
         _strictXhtmlLinks = strictXhtmlLinks;
 1155  52
     }
 1156  
 
 1157  
     public boolean isTomahawkAvailable()
 1158  
     {
 1159  0
         return TOMAHAWK_AVAILABLE;
 1160  
     }
 1161  
 
 1162  
     public boolean isMyfacesImplAvailable()
 1163  
     {
 1164  0
         return MYFACES_IMPL_AVAILABLE;
 1165  
     }
 1166  
 
 1167  
     public boolean isRiImplAvailable()
 1168  
     {
 1169  0
         return RI_IMPL_AVAILABLE;
 1170  
     }
 1171  
 
 1172  
     /**
 1173  
      * Do not use this in renderers directly!
 1174  
      * You should use {@link org.apache.myfaces.shared.renderkit.html.util.JavascriptUtils#isJavascriptAllowed}
 1175  
      * to determine if javascript is allowed or not.
 1176  
      */
 1177  
     public boolean isAllowJavascript()
 1178  
     {
 1179  0
         return _allowJavascript;
 1180  
     }
 1181  
 
 1182  
     private void setAllowJavascript(boolean allowJavascript)
 1183  
     {
 1184  52
         _allowJavascript = allowJavascript;
 1185  52
     }
 1186  
 
 1187  
     public boolean isAutoScroll()
 1188  
     {
 1189  0
         return _autoScroll;
 1190  
     }
 1191  
 
 1192  
     private void setAutoScroll(boolean autoScroll)
 1193  
     {
 1194  26
         _autoScroll = autoScroll;
 1195  26
     }
 1196  
 
 1197  
     private void setAddResourceClass(String addResourceClass)
 1198  
     {
 1199  26
         _addResourceClass = addResourceClass;
 1200  26
     }
 1201  
 
 1202  
     public String getAddResourceClass()
 1203  
     {
 1204  0
         return _addResourceClass;
 1205  
     }
 1206  
 
 1207  
     /**
 1208  
      * ExtensionFilter needs access to AddResourceClass init param without having
 1209  
      * an ExternalContext at hand.
 1210  
      */
 1211  
     public static String getAddResourceClassFromServletContext(ServletContext servletContext)
 1212  
     {
 1213  0
         String addResourceClass = servletContext.getInitParameter(INIT_PARAM_ADD_RESOURCE_CLASS);
 1214  
 
 1215  0
         return addResourceClass == null ? INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT : addResourceClass;
 1216  
     }
 1217  
 
 1218  
     /**
 1219  
      * Should the environment be checked so that the ExtensionsFilter will work properly. 
 1220  
      */
 1221  
     public boolean isCheckExtensionsFilter()
 1222  
     {
 1223  0
         return _checkExtensionsFilter;
 1224  
     }
 1225  
 
 1226  
     public void setCheckExtensionsFilter(boolean extensionsFilter)
 1227  
     {
 1228  26
         _checkExtensionsFilter = extensionsFilter;
 1229  26
     }
 1230  
 
 1231  
     /**
 1232  
      * 
 1233  
      */
 1234  
     public boolean isViewStateJavascript()
 1235  
     {
 1236  0
         return _viewStateJavascript;
 1237  
     }
 1238  
 
 1239  
     private void setViewStateJavascript(boolean viewStateJavascript)
 1240  
     {
 1241  52
         _viewStateJavascript = viewStateJavascript;
 1242  52
     }
 1243  
 
 1244  
     public void setRenderClearJavascriptOnButton(
 1245  
             boolean renderClearJavascriptOnButton)
 1246  
     {
 1247  52
         _renderClearJavascriptOnButton = renderClearJavascriptOnButton;
 1248  52
     }
 1249  
 
 1250  
     /**
 1251  
      * This param renders the clear javascript on button necessary only for
 1252  
      * compatibility with hidden fields feature of myfaces. This is done 
 1253  
      * because jsf ri does not render javascript on onclick method for button,
 1254  
      * so myfaces should do this.
 1255  
      * 
 1256  
      * @return
 1257  
      */
 1258  
     public boolean isRenderClearJavascriptOnButton()
 1259  
     {
 1260  0
         return _renderClearJavascriptOnButton;
 1261  
     }
 1262  
 
 1263  
     public boolean isRenderHiddenFieldsForLinkParams()
 1264  
     {
 1265  0
         return renderHiddenFieldsForLinkParams;
 1266  
     }
 1267  
 
 1268  
     public void setRenderHiddenFieldsForLinkParams(
 1269  
             boolean renderHiddenFieldsForLinkParams)
 1270  
     {
 1271  52
         this.renderHiddenFieldsForLinkParams = renderHiddenFieldsForLinkParams;
 1272  52
     }
 1273  
 
 1274  
     public void setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE)
 1275  
     {
 1276  52
         _saveFormSubmitLinkIE = saveFormSubmitLinkIE;
 1277  52
     }
 1278  
 
 1279  
     /**
 1280  
      * Add a code that save the form when submit a form using a
 1281  
      * link. It's a bug on IE.
 1282  
      * 
 1283  
      * @return
 1284  
      */
 1285  
     public boolean isSaveFormSubmitLinkIE()
 1286  
     {
 1287  0
         return _saveFormSubmitLinkIE;
 1288  
     }
 1289  
     
 1290  
     public String getDelegateFacesServlet()
 1291  
     {
 1292  0
         return _delegateFacesServlet;
 1293  
     }
 1294  
     
 1295  
     public void setDelegateFacesServlet(String delegateFacesServlet)
 1296  
     {
 1297  26
         _delegateFacesServlet = delegateFacesServlet;
 1298  26
     }
 1299  
 
 1300  
     public boolean isRefreshTransientBuildOnPSS()
 1301  
     {
 1302  0
         return _refreshTransientBuildOnPSS;
 1303  
     }
 1304  
 
 1305  
     public void setRefreshTransientBuildOnPSS(boolean refreshTransientBuildOnPSS)
 1306  
     {
 1307  52
         this._refreshTransientBuildOnPSS = refreshTransientBuildOnPSS;
 1308  52
     }
 1309  
 
 1310  
     public boolean isRefreshTransientBuildOnPSSAuto()
 1311  
     {
 1312  0
         return _refreshTransientBuildOnPSSAuto;
 1313  
     }
 1314  
 
 1315  
     public void setRefreshTransientBuildOnPSSAuto(
 1316  
             boolean refreshTransientBuildOnPSSAuto)
 1317  
     {
 1318  52
         this._refreshTransientBuildOnPSSAuto = refreshTransientBuildOnPSSAuto;
 1319  52
     }
 1320  
 
 1321  
     public boolean isRefreshTransientBuildOnPSSPreserveState()
 1322  
     {
 1323  0
         return refreshTransientBuildOnPSSPreserveState;
 1324  
     }
 1325  
 
 1326  
     public void setRefreshTransientBuildOnPSSPreserveState(
 1327  
             boolean refreshTransientBuildOnPSSPreserveState)
 1328  
     {
 1329  52
         this.refreshTransientBuildOnPSSPreserveState = refreshTransientBuildOnPSSPreserveState;
 1330  52
     }
 1331  
     
 1332  
     public boolean isValidateXML()
 1333  
     {
 1334  0
         return _validateXML;
 1335  
     }
 1336  
 
 1337  
     public void setValidateXML(boolean validateXML)
 1338  
     {
 1339  52
         _validateXML = validateXML;
 1340  52
     }
 1341  
 
 1342  
     public boolean isWrapScriptContentWithXmlCommentTag()
 1343  
     {
 1344  0
         return _wrapScriptContentWithXmlCommentTag;
 1345  
     }
 1346  
 
 1347  
     public void setWrapScriptContentWithXmlCommentTag(
 1348  
             boolean wrapScriptContentWithXmlCommentTag)
 1349  
     {
 1350  52
         this._wrapScriptContentWithXmlCommentTag = wrapScriptContentWithXmlCommentTag;
 1351  52
     }
 1352  
 
 1353  
     public boolean isRenderFormSubmitScriptInline()
 1354  
     {
 1355  0
         return _renderFormSubmitScriptInline;
 1356  
     }
 1357  
 
 1358  
     public void setRenderFormSubmitScriptInline(
 1359  
             boolean renderFormSubmitScriptInline)
 1360  
     {
 1361  52
         _renderFormSubmitScriptInline = renderFormSubmitScriptInline;
 1362  52
     }
 1363  
 
 1364  
     public boolean isDebugPhaseListenerEnabled()
 1365  
     {
 1366  0
         return _debugPhaseListenerEnabled;
 1367  
     }
 1368  
 
 1369  
     public void setDebugPhaseListenerEnabled(boolean debugPhaseListener)
 1370  
     {
 1371  52
         this._debugPhaseListenerEnabled = debugPhaseListener;
 1372  52
     }
 1373  
 
 1374  
     public boolean isStrictJsf2RefreshTargetAjax()
 1375  
     {
 1376  0
         return _strictJsf2RefreshTargetAjax;
 1377  
     }
 1378  
 
 1379  
     public void setStrictJsf2RefreshTargetAjax(boolean strictJsf2RefreshTargetAjax)
 1380  
     {
 1381  52
         this._strictJsf2RefreshTargetAjax = strictJsf2RefreshTargetAjax;
 1382  52
     }
 1383  
 
 1384  
     public boolean isStrictJsf2CCELResolver()
 1385  
     {
 1386  0
         return _strictJsf2CCELResolver;
 1387  
     }
 1388  
 
 1389  
     public void setStrictJsf2CCELResolver(boolean strictJsf2CCELResolver)
 1390  
     {
 1391  52
         this._strictJsf2CCELResolver = strictJsf2CCELResolver;
 1392  52
     }
 1393  
 
 1394  
     public String getDefaultResponseWriterContentTypeMode()
 1395  
     {
 1396  0
         return _defaultResponseWriterContentTypeMode;
 1397  
     }
 1398  
 
 1399  
     public void setDefaultResponseWriterContentTypeMode(
 1400  
             String defaultResponseWriterContentTypeMode)
 1401  
     {
 1402  52
         this._defaultResponseWriterContentTypeMode = defaultResponseWriterContentTypeMode;
 1403  52
     }
 1404  
 
 1405  
     public boolean isViewUniqueIdsCacheEnabled()
 1406  
     {
 1407  0
         return _viewUniqueIdsCacheEnabled;
 1408  
     }
 1409  
 
 1410  
     public void setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled)
 1411  
     {
 1412  52
         _viewUniqueIdsCacheEnabled = viewUniqueIdsCacheEnabled;
 1413  52
     }
 1414  
 
 1415  
     public boolean isSupportJSPAndFacesEL()
 1416  
     {
 1417  0
         return _supportJSPAndFacesEL;
 1418  
     }
 1419  
 
 1420  
     public void setSupportJSPAndFacesEL(
 1421  
             boolean supportJSPANDFacesEL)
 1422  
     {
 1423  52
         _supportJSPAndFacesEL = supportJSPANDFacesEL;
 1424  52
     }
 1425  
 
 1426  
     public int getComponentUniqueIdsCacheSize()
 1427  
     {
 1428  0
         return _componentUniqueIdsCacheSize;
 1429  
     }
 1430  
 
 1431  
     public void setComponentUniqueIdsCacheSize(int componentUniqueIdsCacheSize)
 1432  
     {
 1433  52
         this._componentUniqueIdsCacheSize = componentUniqueIdsCacheSize;
 1434  52
     }
 1435  
 
 1436  
     public String getGaeJsfJarFiles()
 1437  
     {
 1438  0
         return _gaeJsfJarFiles;
 1439  
     }
 1440  
 
 1441  
     public void setGaeJsfJarFiles(String gaeJsfJarFiles)
 1442  
     {
 1443  52
         this._gaeJsfJarFiles = gaeJsfJarFiles;
 1444  52
     }
 1445  
 
 1446  
     public String getGaeJsfAnnotationsJarFiles()
 1447  
     {
 1448  0
         return _gaeJsfAnnotationsJarFiles;
 1449  
     }
 1450  
 
 1451  
     public void setGaeJsfAnnotationsJarFiles(String gaeJsfAnnotationsJarFiles)
 1452  
     {
 1453  52
         this._gaeJsfAnnotationsJarFiles = gaeJsfAnnotationsJarFiles;
 1454  52
     }
 1455  
 
 1456  
     public boolean isStrictJsf2ViewNotFound()
 1457  
     {
 1458  0
         return _strictJsf2ViewNotFound;
 1459  
     }
 1460  
 
 1461  
     public void setStrictJsf2ViewNotFound(boolean strictJsf2ViewNotFound)
 1462  
     {
 1463  52
         this._strictJsf2ViewNotFound = strictJsf2ViewNotFound;
 1464  52
     }
 1465  
 
 1466  
     public boolean isEarlyFlushEnabled()
 1467  
     {
 1468  13
         return _earlyFlushEnabled;
 1469  
     }
 1470  
 
 1471  
     public void setEarlyFlushEnabled(boolean earlyFlushEnabled)
 1472  
     {
 1473  52
         this._earlyFlushEnabled = earlyFlushEnabled;
 1474  52
     }
 1475  
 
 1476  
     public boolean isCdiManagedConvertersEnabled()
 1477  
     {
 1478  0
         return _cdiManagedConvertersEnabled;
 1479  
     }
 1480  
 
 1481  
     public void setCdiManagedConvertersEnabled(boolean cdiManagedConvertersEnabled)
 1482  
     {
 1483  52
         this._cdiManagedConvertersEnabled = cdiManagedConvertersEnabled;
 1484  52
     }
 1485  
 
 1486  
     public boolean isCdiManagedValidatorsEnabled()
 1487  
     {
 1488  0
         return _cdiManagedValidatorsEnabled;
 1489  
     }
 1490  
 
 1491  
     public void setCdiManagedValidatorsEnabled(boolean cdiManagedValidatorsEnabled)
 1492  
     {
 1493  52
         this._cdiManagedValidatorsEnabled = cdiManagedValidatorsEnabled;
 1494  52
     }
 1495  
 
 1496  
     public boolean isStrictJsf2FaceletsCompatibility()
 1497  
     {
 1498  0
         return _strictJsf2FaceletsCompatibility;
 1499  
     }
 1500  
 
 1501  
     public void setStrictJsf2FaceletsCompatibility(boolean strictJsf2FaceletsCompatibility)
 1502  
     {
 1503  52
         this._strictJsf2FaceletsCompatibility = strictJsf2FaceletsCompatibility;
 1504  52
     }
 1505  
 
 1506  
     public boolean isRenderFormViewStateAtBegin()
 1507  
     {
 1508  0
         return _renderFormViewStateAtBegin;
 1509  
     }
 1510  
 
 1511  
     public void setRenderFormViewStateAtBegin(boolean renderFormViewStateAtBegin)
 1512  
     {
 1513  52
         this._renderFormViewStateAtBegin = renderFormViewStateAtBegin;
 1514  52
     }
 1515  
 
 1516  
     public boolean isFlashScopeDisabled()
 1517  
     {
 1518  13
         return _flashScopeDisabled;
 1519  
     }
 1520  
 
 1521  
     public void setFlashScopeDisabled(boolean flashScopeDisabled)
 1522  
     {
 1523  52
         this._flashScopeDisabled = flashScopeDisabled;
 1524  52
     }
 1525  
 
 1526  
     /**
 1527  
      * @return the _numberOfViewsInSession
 1528  
      */
 1529  
     public Integer getNumberOfViewsInSession()
 1530  
     {
 1531  52
         return _numberOfViewsInSession;
 1532  
     }
 1533  
 
 1534  
     /**
 1535  
      * @param _numberOfViewsInSession the _numberOfViewsInSession to set
 1536  
      */
 1537  
     public void setNumberOfViewsInSession(Integer numberOfViewsInSession)
 1538  
     {
 1539  52
         this._numberOfViewsInSession = numberOfViewsInSession;
 1540  52
     }
 1541  
 
 1542  
     /**
 1543  
      * @return the _numberOfSequentialViewsInSession
 1544  
      */
 1545  
     public Integer getNumberOfSequentialViewsInSession()
 1546  
     {
 1547  52
         return _numberOfSequentialViewsInSession;
 1548  
     }
 1549  
 
 1550  
     /**
 1551  
      * @param _numberOfSequentialViewsInSession the _numberOfSequentialViewsInSession to set
 1552  
      */
 1553  
     public void setNumberOfSequentialViewsInSession(Integer numberOfSequentialViewsInSession)
 1554  
     {
 1555  52
         this._numberOfSequentialViewsInSession = numberOfSequentialViewsInSession;
 1556  52
     }
 1557  
 
 1558  
     /**
 1559  
      * @return the _numberOfFlashTokensInSession
 1560  
      */
 1561  
     public Integer getNumberOfFlashTokensInSession()
 1562  
     {
 1563  0
         return _numberOfFlashTokensInSession;
 1564  
     }
 1565  
 
 1566  
     /**
 1567  
      * @param _numberOfFlashTokensInSession the _numberOfFlashTokensInSession to set
 1568  
      */
 1569  
     public void setNumberOfFlashTokensInSession(Integer numberOfFlashTokensInSession)
 1570  
     {
 1571  52
         this._numberOfFlashTokensInSession = numberOfFlashTokensInSession;
 1572  52
     }
 1573  
 
 1574  
     /**
 1575  
      * @return the _numberOfFacesFlowClientWindowIdsInSession
 1576  
      */
 1577  
     public Integer getNumberOfFacesFlowClientWindowIdsInSession()
 1578  
     {
 1579  0
         return _numberOfFacesFlowClientWindowIdsInSession;
 1580  
     }
 1581  
 
 1582  
     /**
 1583  
      * @param _numberOfFacesFlowClientWindowIdsInSession the _numberOfFacesFlowClientWindowIdsInSession to set
 1584  
      */
 1585  
     public void setNumberOfFacesFlowClientWindowIdsInSession(Integer numberOfFacesFlowClientWindowIdsInSession)
 1586  
     {
 1587  26
         this._numberOfFacesFlowClientWindowIdsInSession = numberOfFacesFlowClientWindowIdsInSession;
 1588  26
     }
 1589  
     
 1590  
     /**
 1591  
      * @return the _supportEL3ImportHandler
 1592  
      */
 1593  
     public boolean isSupportEL3ImportHandler()
 1594  
     {
 1595  0
         return _supportEL3ImportHandler;
 1596  
     }
 1597  
     
 1598  
     /**
 1599  
      * @param supportEL3ImportHandler the _supportEL3ImportHandler to set
 1600  
      */
 1601  
     public void setSupportEL3ImportHandler(boolean supportEL3ImportHandler)
 1602  
     {
 1603  52
         this._supportEL3ImportHandler = supportEL3ImportHandler;
 1604  52
     }
 1605  
 
 1606  
     public boolean isStrictJsf2OriginHeaderAppPath()
 1607  
     {
 1608  0
         return _strictJsf2OriginHeaderAppPath;
 1609  
     }
 1610  
     
 1611  
     public void setStrictJsf2OriginHeaderAppPath(boolean strictJsf2OriginHeaderAppPath)
 1612  
     {
 1613  52
         this._strictJsf2OriginHeaderAppPath = strictJsf2OriginHeaderAppPath;
 1614  52
     }
 1615  
 
 1616  
     public boolean isAlwaysForceSessionCreation()
 1617  
     {
 1618  0
         return _alwaysForceSessionCreation;
 1619  
     }
 1620  
     
 1621  
     /**
 1622  
      * @param alwaysForceSessionCreation the _alwaysForceSessionCreation to set
 1623  
      */
 1624  
     public void setAlwaysForceSessionCreation(boolean alwaysForceSessionCreation)
 1625  
     {
 1626  52
         this._alwaysForceSessionCreation = alwaysForceSessionCreation;
 1627  52
     }
 1628  
 }