Class MyfacesConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Defines if a session should be created (if one does not exist) before response rendering.protected static final boolean
static final String
Add autocomplete="off" to the view state hidden field.static final boolean
static final String
Enforce f:validateBean to be called first before any Faces validator.static final String
Indicates if expressions generated by facelets should be cached or not.static final String
Define how duplicate ids are checked when ProjectStage is Production, by default (auto) it only check ids of components that does not encapsulate markup (like facelets UILeaf).static final String
static final String
static final String
Define the time in minutes where the view state is valid when client side state saving is used.static final String
Set the size of the cache used to store strings generated using SectionUniqueIdCounter for component ids.static final String
Indicates that the serialized state will be compressed before it is written to the session.static final String
Set the time in seconds that check for updates of web.xml and faces-config descriptors and refresh the configuration.static final String
Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder variables (submittedValue, localValue, value).static final String
Define the default content type that the default ResponseWriter generates, when no match can be derived from HTTP Accept Header.static final String
static final String
Define a custom comparator class used to sort the ELResolvers.static final String
static final String
Defines if ELResolvers should be traced on each request and logged.static final boolean
static final String
This parameter specifies the ExpressionFactory implementation to use.static final String
comma delimited list of plugin classes which can be hooked into myfacesstatic final String
Indicate the class implementing FacesInitializer interface that will be used to setup MyFaces Core contexts.static final String
Defines whether flash scope is disabled, preventing add the Flash cookie to the response.static final String
If this param is set to true, the check for faces servlet mapping is not donestatic final String
If the flag is true, the algoritm skip jar scanning for faces-config files to check if the current application requires FacesServlet to be added dynamically (servlet spec 3).static final String
Define the class implementing InjectionProvider interface to handle dependendy injection, PostConstruct and PreDestroy callbacks.static final String
Indicate if the classes associated to components, converters, validators or behaviors should be loaded as soon as they are added to the current application instance or instead loaded in a lazy way.static final String
Indicate if INFO logging of all the web config params should be done before initialize the webapp.static final String
static final String
Indicate the max number of flash tokens stored into session.static final String
Indicates the amount of views (default is not active) that should be stored in session between sequential POST or POST-REDIRECT-GET if org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION is true.static final Integer
static final String
Defines the amount (default = 20) of the latest views are stored in session.static final int
Default value fororg.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
context parameter.static final String
Defines how to generate the csrf session token.static final String
static final String
static final String
Adds a random key to the generated view state session token.static final String
Set the default length of the random key added to the view state session token.static final String
static final String
static final String
Sets the random algorithm to initialize the secure random id generator.static final String
Sets the random class to initialize the secure random id generator.static final String
Sets the random provider to initialize the secure random id generator.static final String
Defines how to generate the csrf session token.static final String
static final String
static final String
Indicate if the facelet associated to the view should be reapplied when the view is refreshed.static final String
Enable or disable a special mode that enable full state for parent components containing c:if, c:forEach, c:choose and ui:include with src=ELExpression.static final String
This param renders the clear javascript on button necessary only for compatibility with hidden fields feature of myfaces.static final String
Defines if the clientbehavior scripts are passed as string or function to the faces.util.chain.static final boolean
static final String
This param makes h:form component to render the view state and other hidden fields at the beginning of the form.static final String
Define if the input field that should store the state (jakarta.faces.ViewState) should render id="jakarta.faces.ViewState".static final String
Define the default buffer size that is used between Resource.getInputStream() and httpServletResponse.getOutputStream() when rendering resources using the default ResourceHandler.static final String
Defines theResourceBundle.Control
to use for allResourceBundle.getBundle(java.lang.String)
calls.static final String
Defines if the last-modified should be cached of the resources when the ProjectStage is Production.static final String
Enable or disable the cache used to "remember" if a resource handled by the default ResourceHandler exists or not.static final String
Controls the size of the cache used to check if a resource exists or not.static final String
Set the max time in miliseconds set on the "Expires" header for a resource rendered by the default ResourceHandler.static final String
Servlet context init parameter which defines which packages to scan for beans, separated by commas.static final String
Allow slash in the library name of a Resource.static final String
Change default getType() behavior for composite component EL resolver, from return null (see Faces 2_0 spec section 5_6_2_2) to use the metadata information added by composite:attribute, ensuring components working with chained EL expressions to find the right type when a getType() is called over the source EL expression.static final String
This param makes components like c:set, ui:param and templating components like ui:decorate, ui:composition and ui:include to behave like the ones provided originally in facelets 1_1_x.static final String
This parameter specifies whether or not the Origin header app path should be checkedstatic final String
If this param is set to true, a check will be done in Restore View Phase to check if the viewId exists or not and if it does not exists, a 404 response will be thrown.static final String
Use "&" entity instead a plain "&" character within HTML.static final String
This parameter specifies whether or not the ImportHandler will be supportedstatic final String
Defines if CDI should be used for annotation scanning to improve the startup performance.static final String
Allow use flash scope to keep track of the views used in session and the previous ones, so server side state saving can delete old views even if POST-REDIRECT-GET pattern is used.static final String
Validate if the managed beans and navigations rules are correct.static final String
If set totrue
, tag library XML files and faces config XML files using schema will be validated during application start upstatic final String
Enable or disable a cache used to "remember" the generated facelets unique ids and reduce the impact on memory usage, only active if jakarta.faces.FACELETS_REFRESH_PERIOD is -1 (no refresh).static final String
static final String
static final String
static final String
static final String
Indicates the port used for websocket connections.static final String
static final Integer
static final String
static final String
Wrap content inside script with xml comment to prevent old browsers to display it.static final String
Wrap exception caused by calls to EL expressions, so information like the location, expression string and tag name can be retrieved by the ExceptionHandler implementation and used to output meaningful information about itself. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
int
long
static MyfacesConfig
static MyfacesConfig
getCurrentInstance
(ExternalContext extCtx) static MyfacesConfig
getCurrentInstance
(FacesContext facesContext) int
long
String[]
String[]
int
int
int
long
int
String[]
int
long
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
-
Field Details
-
CONFIG_REFRESH_PERIOD
@JSFWebConfigParam(defaultValue="2", since="1.1", classType="java.lang.Long") public static final String CONFIG_REFRESH_PERIODSet the time in seconds that check for updates of web.xml and faces-config descriptors and refresh the configuration. This param is valid only if project stage is not production. Set this param to 0 disable this feature.- See Also:
-
RENDER_VIEWSTATE_ID
@JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no", since="1.1", ignoreUpperLowerCase=true, group="state") public static final String RENDER_VIEWSTATE_IDDefine if the input field that should store the state (jakarta.faces.ViewState) should render id="jakarta.faces.ViewState". Faces API 1.2 defines a "jakarta.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 org.apache.myfaces.RENDER_VIEWSTATE_ID context parameter you can tune this behaviour.
Set it to- true - to render Faces 1.2 compliant id attributes (that might cause invalid XHTML), or
- false - to omit rendering of the id attribute (which is only needed for very special AJAX/Javascript components)
- See Also:
-
STRICT_XHTML_LINKS
@JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no", since="1.1.6", ignoreUpperLowerCase=true, group="render") public static final String STRICT_XHTML_LINKSUse "&" entity instead a plain "&" character within HTML.W3C recommends to use the "&" entity instead of a plain "&" character within HTML. This also applies to attribute values and thus to the "href" attribute of <a> elements as well. Even more, when XHTML is used as output the usage of plain "&" characters is forbidden and would lead to invalid XML code. Therefore, since version 1.1.6 MyFaces renders the correct "&" entity for links.
The init parameter org.apache.myfaces.STRICT_XHTML_LINKS makes it possible to restore the old behaviour and to make MyFaces "bug compatible" to the Sun RI which renders plain "&" chars in links as well.
See: HTML 4.01 Specification See: Jira: MYFACES-1774
- See Also:
-
RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON
@JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no", since="1.2.3", ignoreUpperLowerCase=true, group="render") public static final String RENDER_CLEAR_JAVASCRIPT_FOR_BUTTONThis 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.- See Also:
-
REFRESH_TRANSIENT_BUILD_ON_PSS
@JSFWebConfigParam(since="2.0", defaultValue="auto", expectedValues="true,false,auto", tags="performance", ignoreUpperLowerCase=true, group="state") public static final String REFRESH_TRANSIENT_BUILD_ON_PSSIndicate if the facelet associated to the view should be reapplied when the view is refreshed. Default mode is "auto".This param is only valid when partial state saving is on. If this is set as true, the tag-handlers are always reapplied before render view, like in facelets 1.1.x, allowing c:if work correctly to "toggle" components based on a value changed on invoke application phase. If the param is set as "auto", the implementation check if c:if, c:forEach, c:choose and ui:include with src=ELExpression is used on the page and if that so, mark the view to be refreshed.
- See Also:
-
REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE
@JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false, on, off, yes, no", tags="performance", ignoreUpperLowerCase=true, group="state") public static final String REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATEEnable or disable a special mode that enable full state for parent components containing c:if, c:forEach, c:choose and ui:include with src=ELExpression. By default is disabled(false).This param is only valid when partial state saving is on. If this is set as true, parent components containing c:if, c:forEach, c:choose and ui:include with src=ELExpression are marked to be restored fully, so state is preserved between request.
- See Also:
-
VALIDATE_XML
@JSFWebConfigParam(since="2.0", expectedValues="true, false, on, off, yes, no", ignoreUpperLowerCase=true) public static final String VALIDATE_XMLIf set totrue
, tag library XML files and faces config XML files using schema will be validated during application start up- See Also:
-
WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG
@JSFWebConfigParam(since="2.0.1", expectedValues="true, false, on, off, yes, no", defaultValue="false", ignoreUpperLowerCase=true, group="render") public static final String WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAGWrap content inside script with xml comment to prevent old browsers to display it. By default it is true.- See Also:
-
DEBUG_PHASE_LISTENER
Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder variables (submittedValue, localValue, value). Note evaluate those getters for each component could cause some unwanted side effects when using "access" type scopes like on MyFaces CODI. This param only has effect when project stage is Development.- See Also:
-
STRICT_JSF_2_CC_EL_RESOLVER
@JSFWebConfigParam(since="2.0.10", expectedValues="true, false", defaultValue="false", group="EL") public static final String STRICT_JSF_2_CC_EL_RESOLVERChange default getType() behavior for composite component EL resolver, from return null (see Faces 2_0 spec section 5_6_2_2) to use the metadata information added by composite:attribute, ensuring components working with chained EL expressions to find the right type when a getType() is called over the source EL expression. To ensure strict compatibility with the spec set this param to true (by default is false, so the change is enabled by default).- See Also:
-
DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE
@JSFWebConfigParam(since="2.0.11,2.1.5", expectedValues="text/html, application/xhtml+xml", defaultValue="text/html", group="render") public static final String DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODEDefine the default content type that the default ResponseWriter generates, when no match can be derived from HTTP Accept Header.- See Also:
-
VIEW_UNIQUE_IDS_CACHE_ENABLED
@JSFWebConfigParam(defaultValue="true", since="2.0.13, 2.1.7", expectedValues="true, false", 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 VIEW_UNIQUE_IDS_CACHE_ENABLEDEnable or disable a cache used to "remember" the generated facelets unique ids and reduce the impact on memory usage, only active if jakarta.faces.FACELETS_REFRESH_PERIOD is -1 (no refresh).- See Also:
-
COMPONENT_UNIQUE_IDS_CACHE_SIZE
@JSFWebConfigParam(defaultValue="100", since="2.0.13, 2.1.7", group="viewhandler", tags="performance") public static final String COMPONENT_UNIQUE_IDS_CACHE_SIZESet the size of the cache used to store strings generated using SectionUniqueIdCounter for component ids. If this is set to 0, no cache is used. By default is set to 200.- See Also:
-
STRICT_JSF_2_VIEW_NOT_FOUND
@JSFWebConfigParam(since="2.1.13", defaultValue="false", expectedValues="true,false", group="viewhandler") public static final String STRICT_JSF_2_VIEW_NOT_FOUNDIf this param is set to true, a check will be done in Restore View Phase to check if the viewId exists or not and if it does not exists, a 404 response will be thrown. This is applicable in cases where all the views in the application are generated by a ViewDeclarationLanguage implementation.- See Also:
-
EARLY_FLUSH_ENABLED
@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.") public static final String EARLY_FLUSH_ENABLED- See Also:
-
STRICT_JSF_2_FACELETS_COMPATIBILITY
@JSFWebConfigParam(since="2.2.0", defaultValue="false", expectedValues="true,false", group="viewhandler") public static final String STRICT_JSF_2_FACELETS_COMPATIBILITYThis param makes components like c:set, ui:param and templating components like ui:decorate, ui:composition and ui:include to behave like the ones provided originally in facelets 1_1_x. See MYFACES-3810 for details.- See Also:
-
RENDER_FORM_VIEW_STATE_AT_BEGIN
@JSFWebConfigParam(since="2.2.4", defaultValue="false", expectedValues="true,false", group="render") public static final String RENDER_FORM_VIEW_STATE_AT_BEGINThis param makes h:form component to render the view state and other hidden fields at the beginning of the form. This also includes component resources with target="form", but it does not include legacy 1.1 myfaces specific hidden field adition.- See Also:
-
FLASH_SCOPE_DISABLED
@JSFWebConfigParam(defaultValue="false", since="2.0.5") public static final String FLASH_SCOPE_DISABLEDDefines whether flash scope is disabled, preventing add the Flash cookie to the response.This is useful for applications that does not require to use flash scope, and instead uses other scopes.
- See Also:
-
NUMBER_OF_VIEWS_IN_SESSION
@JSFWebConfigParam(defaultValue="20", since="1.1", classType="java.lang.Integer", group="state", tags="performance") public static final String NUMBER_OF_VIEWS_IN_SESSIONDefines the amount (default = 20) of the latest views are stored in session.Only applicable if state saving method is "server" (= default).
- See Also:
-
NUMBER_OF_VIEWS_IN_SESSION_DEFAULT
public static final int NUMBER_OF_VIEWS_IN_SESSION_DEFAULTDefault value fororg.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
context parameter.- See Also:
-
NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
@JSFWebConfigParam(since="2.0.6", classType="java.lang.Integer", group="state", tags="performance", defaultValue="4") public static final String NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSIONIndicates the amount of views (default is not active) that should be stored in session between sequential POST or POST-REDIRECT-GET if org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION is true.Only applicable if state saving method is "server" (= default). For example, if this param has value = 2 and in your custom webapp there is a form that is clicked 3 times, only 2 views will be stored and the third one (the one stored the first time) will be removed from session, even if the view can store more sessions org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION. This feature becomes useful for multi-window applications. where without this feature a window can swallow all view slots so the other ones will throw ViewExpiredException.
- See Also:
-
NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT
-
NUMBER_OF_FLASH_TOKENS_IN_SESSION
@JSFWebConfigParam(since="2.2.6", group="state", tags="performance") public static final String NUMBER_OF_FLASH_TOKENS_IN_SESSIONIndicate the max number of flash tokens stored into session. It is only active when jakarta.faces.CLIENT_WINDOW_MODE is enabled and jakarta.faces.STATE_SAVING_METHOD is set to "server". Each flash token is associated to one client window id at the same time, so this param is related to the limit of active client windows per session. By default is the same number as in (org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION / org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION) + 1 = 6.- See Also:
-
SUPPORT_EL_3_IMPORT_HANDLER
@JSFWebConfigParam(since="2.2.9", defaultValue="false", expectedValues="true,false", group="EL") public static final String SUPPORT_EL_3_IMPORT_HANDLERThis parameter specifies whether or not the ImportHandler will be supported- See Also:
-
STRICT_JSF_2_ORIGIN_HEADER_APP_PATH
@JSFWebConfigParam(since="2.3", defaultValue="false", expectedValues="true,false") public static final String STRICT_JSF_2_ORIGIN_HEADER_APP_PATHThis parameter specifies whether or not the Origin header app path should be checked- See Also:
-
STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
@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_NAMEAllow slash in the library name of a Resource.- See Also:
-
RESOURCE_BUFFER_SIZE
@JSFWebConfigParam(since="2.1.10, 2.0.16", defaultValue="2048", group="resources") public static final String RESOURCE_BUFFER_SIZEDefine the default buffer size that is used between Resource.getInputStream() and httpServletResponse.getOutputStream() when rendering resources using the default ResourceHandler.- See Also:
-
VALIDATE
@JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false") public static final String VALIDATEValidate if the managed beans and navigations rules are correct.For example, it checks if the managed bean classes really exists, or if the navigation rules points to existing view files.
- See Also:
-
USE_CDI_FOR_ANNOTATION_SCANNING
@JSFWebConfigParam(since="2.2.9", tags="performance", defaultValue="false") public static final String USE_CDI_FOR_ANNOTATION_SCANNINGDefines if CDI should be used for annotation scanning to improve the startup performance.- See Also:
-
RESOURCE_HANDLER_CACHE_SIZE
@JSFWebConfigParam(defaultValue="500", since="2.0.2", group="resources", classType="java.lang.Integer", tags="performance") public static final String RESOURCE_HANDLER_CACHE_SIZEControls the size of the cache used to check if a resource exists or not.See org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED for details.
- See Also:
-
RESOURCE_HANDLER_CACHE_ENABLED
@JSFWebConfigParam(defaultValue="true", since="2.0.2", group="resources", expectedValues="true,false", tags="performance") public static final String RESOURCE_HANDLER_CACHE_ENABLEDEnable or disable the cache used to "remember" if a resource handled by the default ResourceHandler exists or not.- See Also:
-
SCAN_PACKAGES
Servlet context init parameter which defines which packages to scan for beans, separated by commas.- See Also:
-
WEBSOCKET_ENDPOINT_PORT
Indicates the port used for websocket connections.- See Also:
-
WEBSOCKET_MAX_IDLE_TIMEOUT
- See Also:
-
RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN
@JSFWebConfigParam(since="2.2.0", expectedValues="secureRandom, random", defaultValue="secureRandom", group="state") public static final String RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKENDefines how to generate the csrf session token.- See Also:
-
RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_SECURE_RANDOM
- See Also:
-
RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_RANDOM
- See Also:
-
CLIENT_VIEW_STATE_TIMEOUT
@JSFWebConfigParam(since="2.1.9, 2.0.15", defaultValue="0", group="state") public static final String CLIENT_VIEW_STATE_TIMEOUTDefine the time in minutes where the view state is valid when client side state saving is used. By default it is set to 0 (infinite).- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN
@JSFWebConfigParam(since="2.1.9, 2.0.15", expectedValues="secureRandom, random", defaultValue="secureRandom", group="state") public static final String RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKENAdds a random key to the generated view state session token.- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM
- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_RANDOM
- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_LENGTH
@JSFWebConfigParam(since="2.1.9, 2.0.15", defaultValue="8", group="state") public static final String RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_LENGTHSet the default length of the random key added to the view state session token. By default is 8.- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_CLASS
@JSFWebConfigParam(since="2.1.9, 2.0.15", group="state") public static final String RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_CLASSSets the random class to initialize the secure random id generator. By default it uses java.security.SecureRandom- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_PROVIDER
@JSFWebConfigParam(since="2.1.9, 2.0.15", group="state") public static final String RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_PROVIDERSets the random provider to initialize the secure random id generator.- See Also:
-
RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_ALGORITHM
@JSFWebConfigParam(since="2.1.9, 2.0.15", defaultValue="SHA1PRNG", group="state") public static final String RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_ALGORITHMSets the random algorithm to initialize the secure random id generator. By default is SHA1PRNG- See Also:
-
RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM
- See Also:
-
RANDOM_KEY_IN_CSRF_SESSION_TOKEN_RANDOM
- See Also:
-
RANDOM_KEY_IN_CSRF_SESSION_TOKEN
@JSFWebConfigParam(since="2.2.0", expectedValues="secureRandom, random", defaultValue="secureRandom", group="state") public static final String RANDOM_KEY_IN_CSRF_SESSION_TOKENDefines how to generate the csrf session token.- See Also:
-
COMPRESS_STATE_IN_SESSION
@JSFWebConfigParam(defaultValue="true", since="1.1", expectedValues="true,false", group="state", tags="performance") public static final String COMPRESS_STATE_IN_SESSIONIndicates that the serialized state will be compressed before it is written to the session. By default true. Only applicable if state saving method is "server" (= default) and ifjakarta.faces.SERIALIZE_SERVER_STATE
istrue
. Iftrue
(default) the serialized state will be compressed before it is written to the session. Iffalse
the state will not be compressed.- See Also:
-
USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION
@JSFWebConfigParam(since="2.0.6", defaultValue="false", expectedValues="true, false", group="state") public static final String USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSIONAllow use flash scope to keep track of the views used in session and the previous ones, so server side state saving can delete old views even if POST-REDIRECT-GET pattern is used.Only applicable if state saving method is "server" (= default). The default value is false.
- See Also:
-
AUTOCOMPLETE_OFF_VIEW_STATE
@JSFWebConfigParam(since="2.2.8, 2.1.18, 2.0.24", expectedValues="true, false", defaultValue="true", group="state") public static final String AUTOCOMPLETE_OFF_VIEW_STATEAdd autocomplete="off" to the view state hidden field. Enabled by default.- See Also:
-
RESOURCE_MAX_TIME_EXPIRES
@JSFWebConfigParam(since="2.0", defaultValue="604800000", group="resources", tags="performance") public static final String RESOURCE_MAX_TIME_EXPIRESSet the max time in miliseconds set on the "Expires" header for a resource rendered by the default ResourceHandler. (default to one week in miliseconds or 604800000)- See Also:
-
LAZY_LOAD_CONFIG_OBJECTS
@JSFWebConfigParam(defaultValue="true", since="2.0", tags="performance") public static final String LAZY_LOAD_CONFIG_OBJECTSIndicate if the classes associated to components, converters, validators or behaviors should be loaded as soon as they are added to the current application instance or instead loaded in a lazy way.- See Also:
-
EL_RESOLVER_COMPARATOR
@JSFWebConfigParam(since="1.2.10, 2.0.2", group="EL", desc="The Class of an Comparator<ELResolver> implementation.") public static final String EL_RESOLVER_COMPARATORDefine a custom comparator class used to sort the ELResolvers.This is useful when it is necessary to put an ELResolver on top of other resolvers. Note set this param override the default ordering described by Faces spec section 5.
- See Also:
-
EL_RESOLVER_PREDICATE
@JSFWebConfigParam(since="2.1.0", group="EL", desc="The Class of an java.util.function.Predicate<ELResolver> implementation.If used and returns false for a ELResolver instance, such resolver will not be installed in ELResolvers chain. Use with caution - can break functionality defined in Faces specification \'ELResolver Instances Provided by Faces\'") public static final String EL_RESOLVER_PREDICATE- See Also:
-
VIEWID_CACHE_SIZE
@JSFWebConfigParam(defaultValue="500", since="2.0.2", group="viewhandler", tags="performance", classType="java.lang.Integer", desc="Controls the size of the viewId related caches: VIEWID_EXISTS_CACHE_ENABLED, VIEWID_PROTECTED_CACHE_ENABLED, VIEWID_DERIVE_CACHE_ENABLED") public static final String VIEWID_CACHE_SIZE- See Also:
-
VIEWID_EXISTS_CACHE_ENABLED
@JSFWebConfigParam(defaultValue="true", since="2.0.2", expectedValues="true, false", group="viewhandler", tags="performance", desc="Enable or disable the cache used to \'remember\' if a view exists or not and reduce the impact of sucesive calls to ExternalContext.getResource().") public static final String VIEWID_EXISTS_CACHE_ENABLED- See Also:
-
VIEWID_PROTECTED_CACHE_ENABLED
@JSFWebConfigParam(defaultValue="true", since="2.3-next", expectedValues="true, false", group="viewhandler", tags="performance", desc="Enable or disable the cache used to \'remember\' if a view is protected or not.") public static final String VIEWID_PROTECTED_CACHE_ENABLED- See Also:
-
VIEWID_DERIVE_CACHE_ENABLED
@JSFWebConfigParam(defaultValue="true", since="2.3-next", expectedValues="true, false", group="viewhandler", tags="performance", desc="Enable or disable the cache used to \'remember\' the derived viewId from the rawViewId.") public static final String VIEWID_DERIVE_CACHE_ENABLED- See Also:
-
BEAN_BEFORE_JSF_VALIDATION
@JSFWebConfigParam(defaultValue="false", expectedValues="true, false", since="2.2.10", group="validation") public static final String BEAN_BEFORE_JSF_VALIDATIONEnforce f:validateBean to be called first before any Faces validator.- See Also:
-
FACES_INIT_PLUGINS
comma delimited list of plugin classes which can be hooked into myfaces- See Also:
-
INITIALIZE_SKIP_JAR_FACES_CONFIG_SCAN
@JSFWebConfigParam(since="2.2.10", expectedValues="true, false", defaultValue="false", tags="performance") public static final String INITIALIZE_SKIP_JAR_FACES_CONFIG_SCANIf the flag is true, the algoritm skip jar scanning for faces-config files to check if the current application requires FacesServlet to be added dynamically (servlet spec 3). This param can be set using a system property with the same name too.- See Also:
-
INITIALIZE_ALWAYS_STANDALONE
@JSFWebConfigParam(since="2.0.3", defaultValue="false") public static final String INITIALIZE_ALWAYS_STANDALONEIf this param is set to true, the check for faces servlet mapping is not done- See Also:
-
EXPRESSION_FACTORY
This parameter specifies the ExpressionFactory implementation to use.- See Also:
-
CHECK_ID_PRODUCTION_MODE
@JSFWebConfigParam(since="2.0.12, 2.1.6", defaultValue="auto", expectedValues="true, auto, false", group="state", tags="performance") public static final String CHECK_ID_PRODUCTION_MODEDefine how duplicate ids are checked when ProjectStage is Production, by default (auto) it only check ids of components that does not encapsulate markup (like facelets UILeaf).- true: check all ids, including ids for components that are transient and encapsulate markup.
- auto: (default) check ids of components that does not encapsulate markup (like facelets UILeaf). Note ids of UILeaf instances are generated by facelets vdl, start with "j_id", are never rendered into the response and UILeaf instances are never used as a target for listeners, so in practice there is no need to check such ids. This reduce the overhead associated with generate client ids.
- false: do not do any check when ProjectStage is Production
According to specification, identifiers must be unique within the scope of the nearest ancestor to the component that is a naming container.
- See Also:
-
CHECK_ID_PRODUCTION_MODE_TRUE
- See Also:
-
CHECK_ID_PRODUCTION_MODE_AUTO
- See Also:
-
MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW
@JSFWebConfigParam(since="2.1", defaultValue="false", expectedValues="true, false", tags="performance") public static final String MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW- See Also:
-
CACHE_EL_EXPRESSIONS
@JSFWebConfigParam(since="2.0.8", defaultValue="noCache", expectedValues="noCache, strict, allowCset, always, alwaysRecompile", group="EL", tags="performance") public static final String CACHE_EL_EXPRESSIONSIndicates if expressions generated by facelets should be cached or not. Default is noCache. There there are four modes:- alwaysRecompile (since 2.1.12): Only does not cache when the expression contains a variable resolved using VariableMapper
- always: Only does not cache when expressions are inside user tags or the expression contains a variable resolved using VariableMapper
- allowCset: Like always, but does not allow cache when ui:param was used on the current template context
- strict: Like allowCset, but does not allow cache when c:set with var and value properties only is used on the current page context
- noCache: All expression are created each time the view is built
- See Also:
-
WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE
@JSFWebConfigParam(since="2.0.9, 2.1.3", defaultValue="true", expectedValues="true, false") public static final String WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWAREWrap exception caused by calls to EL expressions, so information like the location, expression string and tag name can be retrieved by the ExceptionHandler implementation and used to output meaningful information about itself.Note in some cases this will wrap the original jakarta.el.ELException, so the information will not be on the stack trace unless ExceptionHandler retrieve checking if the exception implements ContextAware interface and calling getWrapped() method.
- See Also:
-
RESOURCE_CACHE_LAST_MODIFIED
@JSFWebConfigParam(since="2.3-next", defaultValue="true", expectedValues="true, false") public static final String RESOURCE_CACHE_LAST_MODIFIEDDefines if the last-modified should be cached of the resources when the ProjectStage is Production. If the cache is disabled, each last-modified request will read the last-modified from the file.- See Also:
-
LOG_WEB_CONTEXT_PARAMS
@JSFWebConfigParam(expectedValues="true, dev-only, false", defaultValue="dev-only") public static final String LOG_WEB_CONTEXT_PARAMSIndicate if INFO logging of all the web config params should be done before initialize the webapp.If is set to "dev-only" mode, web config params are only logged in "Development" mode. If is set to "true", web config params are only logged in "Production" and "Development" mode. If is set to "false" mode, info logging does not occur in any mode.
- See Also:
-
AUTOMATIC_EXTENSIONLESS_MAPPING_DEFAULT
public static final boolean AUTOMATIC_EXTENSIONLESS_MAPPING_DEFAULT- See Also:
-
FACES_INITIALIZER
@JSFWebConfigParam(since="2.0.1", desc="Class name of a custom FacesInitializer implementation.") public static final String FACES_INITIALIZERIndicate the class implementing FacesInitializer interface that will be used to setup MyFaces Core contexts.This is used when some custom task must be done specifically when a myfaces web context is initialized or destroyed, or when MyFaces should be initialized in some custom environment.
- See Also:
-
INJECTION_PROVIDER
@JSFWebConfigParam(name="org.apache.myfaces.spi.InjectionProvider", since="2.2") public static final String INJECTION_PROVIDERDefine the class implementing InjectionProvider interface to handle dependendy injection, PostConstruct and PreDestroy callbacks.This also can be configured using a SPI entry (/META-INF/services/...).
-
WEBSOCKET_MAX_CONNECTIONS
@JSFWebConfigParam(name="org.apache.myfaces.WEBSOCKET_MAX_CONNECTIONS", since="2.3") public static final String WEBSOCKET_MAX_CONNECTIONS- See Also:
-
WEBSOCKET_MAX_CONNECTIONS_DEFAULT
-
RENDER_CLIENTBEHAVIOR_SCRIPTS_AS_STRING
@JSFWebConfigParam(name="org.apache.myfaces.RENDER_CLIENTBEHAVIOR_SCRIPTS_AS_STRING", since="2.3-next", defaultValue="false") public static final String RENDER_CLIENTBEHAVIOR_SCRIPTS_AS_STRINGDefines if the clientbehavior scripts are passed as string or function to the faces.util.chain. "As string" is actually the default behavior of both MyFaces (until 2.3-next) and Mojarra. "As function" is quite usefull for CSP as no string needs to be evaluated as function. Our faces.util.chain supports both of course.- See Also:
-
RENDER_CLIENTBEHAVIOR_SCRIPTS_AS_STRING_DEFAULT
public static final boolean RENDER_CLIENTBEHAVIOR_SCRIPTS_AS_STRING_DEFAULT- See Also:
-
ALWAYS_FORCE_SESSION_CREATION
@JSFWebConfigParam(since="2.3.6", defaultValue="false", expectedValues="true,false") public static final String ALWAYS_FORCE_SESSION_CREATIONDefines if a session should be created (if one does not exist) before response rendering. When this parameter is set to true, a session will be created even when client side state saving or stateless views are used, which can lead to unintended resource consumption. When this parameter is set to false, a session will only be created before response rendering if a view is not transient and server side state saving is in use.- See Also:
-
ALWAYS_FORCE_SESSION_CREATION_DEFAULT
protected static final boolean ALWAYS_FORCE_SESSION_CREATION_DEFAULT- See Also:
-
RESOURCE_BUNDLE_CONTROL
Defines theResourceBundle.Control
to use for allResourceBundle.getBundle(java.lang.String)
calls.- See Also:
-
EL_RESOLVER_TRACING
@JSFWebConfigParam(name="org.apache.myfaces.EL_RESOLVER_TRACING", since="4.0", defaultValue="false") public static final String EL_RESOLVER_TRACINGDefines if ELResolvers should be traced on each request and logged. Only active on Development ProjectStage.- See Also:
-
EL_RESOLVER_TRACING_DEFAULT
public static final boolean EL_RESOLVER_TRACING_DEFAULT- See Also:
-
-
Constructor Details
-
MyfacesConfig
public MyfacesConfig()
-
-
Method Details
-
getCurrentInstance
-
getCurrentInstance
-
getCurrentInstance
-
isMyfacesImplAvailable
public boolean isMyfacesImplAvailable() -
isRiImplAvailable
public boolean isRiImplAvailable() -
isStrictJsf2AllowSlashLibraryName
public boolean isStrictJsf2AllowSlashLibraryName() -
getConfigRefreshPeriod
public long getConfigRefreshPeriod() -
isRenderViewStateId
public boolean isRenderViewStateId() -
isStrictXhtmlLinks
public boolean isStrictXhtmlLinks() -
isRenderClearJavascriptOnButton
public boolean isRenderClearJavascriptOnButton() -
isRefreshTransientBuildOnPSS
public boolean isRefreshTransientBuildOnPSS() -
isRefreshTransientBuildOnPSSAuto
public boolean isRefreshTransientBuildOnPSSAuto() -
isRefreshTransientBuildOnPSSPreserveState
public boolean isRefreshTransientBuildOnPSSPreserveState() -
isValidateXML
public boolean isValidateXML() -
isWrapScriptContentWithXmlCommentTag
public boolean isWrapScriptContentWithXmlCommentTag() -
isDebugPhaseListenerEnabled
public boolean isDebugPhaseListenerEnabled() -
isStrictJsf2CCELResolver
public boolean isStrictJsf2CCELResolver() -
getDefaultResponseWriterContentTypeMode
-
isViewUniqueIdsCacheEnabled
public boolean isViewUniqueIdsCacheEnabled() -
getComponentUniqueIdsCacheSize
public int getComponentUniqueIdsCacheSize() -
isStrictJsf2ViewNotFound
public boolean isStrictJsf2ViewNotFound() -
isEarlyFlushEnabled
public boolean isEarlyFlushEnabled() -
isStrictJsf2FaceletsCompatibility
public boolean isStrictJsf2FaceletsCompatibility() -
isRenderFormViewStateAtBegin
public boolean isRenderFormViewStateAtBegin() -
isFlashScopeDisabled
public boolean isFlashScopeDisabled() -
getNumberOfViewsInSession
-
getNumberOfSequentialViewsInSession
-
getNumberOfFlashTokensInSession
-
isSupportEL3ImportHandler
public boolean isSupportEL3ImportHandler() -
isStrictJsf2OriginHeaderAppPath
public boolean isStrictJsf2OriginHeaderAppPath() -
getResourceBufferSize
public int getResourceBufferSize() -
isUseCdiForAnnotationScanning
public boolean isUseCdiForAnnotationScanning() -
isResourceHandlerCacheEnabled
public boolean isResourceHandlerCacheEnabled() -
getResourceHandlerCacheSize
public int getResourceHandlerCacheSize() -
getScanPackages
-
getWebsocketMaxIdleTimeout
public long getWebsocketMaxIdleTimeout() -
getWebsocketEndpointPort
-
getClientViewStateTimeout
public long getClientViewStateTimeout() -
getRandomKeyInViewStateSessionToken
-
getRandomKeyInViewStateSessionTokenLength
public int getRandomKeyInViewStateSessionTokenLength() -
getRandomKeyInViewStateSessionTokenSecureRandomClass
-
getRandomKeyInViewStateSessionTokenSecureRandomProvider
-
getRandomKeyInViewStateSessionTokenSecureRandomAlgorithm
-
getRandomKeyInCsrfSessionToken
-
isSerializeStateInSession
public boolean isSerializeStateInSession() -
isCompressStateInSession
public boolean isCompressStateInSession() -
isUseFlashScopePurgeViewsInSession
public boolean isUseFlashScopePurgeViewsInSession() -
isAutocompleteOffViewState
public boolean isAutocompleteOffViewState() -
getResourceMaxTimeExpires
public long getResourceMaxTimeExpires() -
isLazyLoadConfigObjects
public boolean isLazyLoadConfigObjects() -
getElResolverComparator
-
getElResolverPredicate
-
getViewIdCacheSize
public int getViewIdCacheSize() -
isBeanBeforeJsfValidation
public boolean isBeanBeforeJsfValidation() -
getRandomKeyInWebsocketSessionToken
-
getFacesInitPlugins
-
isInitializeSkipJarFacesConfigScan
public boolean isInitializeSkipJarFacesConfigScan() -
getExpressionFactory
-
getCheckIdProductionMode
-
isPartialStateSaving
public boolean isPartialStateSaving() -
getFullStateSavingViewIds
-
getFaceletsBufferSize
public int getFaceletsBufferSize() -
isMarkInitialStateWhenApplyBuildView
public boolean isMarkInitialStateWhenApplyBuildView() -
getViewSuffix
-
getFaceletsViewMappings
-
getFaceletsViewSuffix
-
isViewIdExistsCacheEnabled
public boolean isViewIdExistsCacheEnabled() -
isViewIdProtectedCacheEnabled
public boolean isViewIdProtectedCacheEnabled() -
isViewIdDeriveCacheEnabled
public boolean isViewIdDeriveCacheEnabled() -
getELExpressionCacheMode
-
isWrapTagExceptionsAsContextAware
public boolean isWrapTagExceptionsAsContextAware() -
isResourceCacheLastModified
public boolean isResourceCacheLastModified() -
isLogWebContextParams
public boolean isLogWebContextParams() -
getWebsocketMaxConnections
public int getWebsocketMaxConnections() -
isRenderClientBehaviorScriptsAsString
public boolean isRenderClientBehaviorScriptsAsString() -
isAlwaysForceSessionCreation
public boolean isAlwaysForceSessionCreation() -
getProjectStage
-
getResourceBundleControl
-
isAutomaticExtensionlessMapping
public boolean isAutomaticExtensionlessMapping() -
getNumberOfClientWindows
-
isElResolverTracing
public boolean isElResolverTracing() -
getFaceletsRefreshPeriod
public long getFaceletsRefreshPeriod()
-