myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (MYFACES-1883) /WEB-INF/faces-config.xml Loaded twice if logging disabled.
Date Thu, 19 Jun 2008 16:35:46 GMT


Leonardo Uribe commented on MYFACES-1883:

To be more specific, the unwanted behavior is when is included /WEB-INF/faces-config.xml in
the context param javax.faces.CONFIG_FILES.

This file is read automatically by default, so if the file is set on this param, this should
be skipped. 

The error is present because the check of this condition looks like this:

 if (log.isWarnEnabled() && DEFAULT_FACES_CONFIG.equals(systemId))

so, if it is included but warn is disabled, the file is added and readed twice. The solution
is to separate this:

                if (DEFAULT_FACES_CONFIG.equals(systemId))

It is fine, so I'll commit this.

> /WEB-INF/faces-config.xml Loaded twice if logging disabled.
> -----------------------------------------------------------
>                 Key: MYFACES-1883
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 1.2.2, 1.2.3
>            Reporter: David Waters
>            Priority: Critical
>         Attachments: MYFACES-1183.patch
> Bug introduced in FacesConfigurator Version 580395 by mmarinschek 28/Sep/07
> While working on MYFACES-1689  mmarinschek introduced an action based on a check if the
provided value was the default and not load this file if it was. Unfortunitly this was reusing
an existing check that also check to see if log.isWarnEnbaled, so the code will behavoe materilly
differently if logging is enabled.
> see FacesConfigurator.getConfigFilesList()
> WARN  FacesConfigurator - /WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES
context parameter of the deployment descriptor. This will automatically be removed, if we
wouldn't do this, it would be loaded twice.  See JSF spec 1.1, 10.3.2

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message