Bonjour, je ne comprends pas le dysfonctionnement concernant les <h:message> de ma page de connexion.

Page connexion:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a4j="http://richfaces.org/a4j">
    <f:view>
    <f:loadBundle basename="OK_Web.langage.lang" var="msg"/>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title><h:outputText value="#{msg.OK_Web_titre_Connection}" /></title>
    </head>
    <body>
        <h1><h:outputText value="#{msg.Connection}" /></h1>
            <h:form id="loginForm">
                <rich:message for="loginForm" errorStyle="errorMessage">
                      <f:facet name="errorMarker">
                            <h:graphicImage url="resources/img/error.gif"/>
                      </f:facet>
                </rich:message><br/>
                <div>
                    <h:outputText id="lbLogin" value="#{msg.Login}" />
                    <h:inputText id="login" required="true" value="#{SessionMB.utilisateur.login}">
                        <f:validateLength maximum="15" minimum="2"/>
                    </h:inputText>
                    <rich:message for="login"/>
                </div>
                <div>
                    <h:outputText id="lbPassword" value="#{msg.Password}"/>
                    <h:inputSecret id="password" required="true" value="#{SessionMB.utilisateur.password}">
                        <f:validateLength maximum="12" minimum="6" />
                    </h:inputSecret>
                    <rich:message for="password"/>
                </div>
                <h:commandButton id="connection" action="#{SessionMB.connect}" value="#{msg.Connection}"/>
            </h:form>
    </body>
    </f:view>
</html>
L'internationalisation et le h:message ayant pour "for":loginForm fonctionnent. Ce message est un peu spécial car il est crée à partir d'une méthode que j'ai construite de A à Z. Mais les messages standards qui s'affichent lorsque un champ est vide malgré qu'il y ait l'attribut required="true" ou les messages liés à la validation "f:validateLength" ne fonctionnent pas. J'obtiens toujours quelque soit le problème, la fameuse page d'erreur qui prend le dessus sur tous les autres si les tests ne sont pas respectés :

État HTTP 500 -

type Rapport d'exception

Message

DescriptionLe serveur a rencontré une erreur interne () qui l'a empêché de remplir cette requête.

Exception

javax.servlet.ServletException: Can't find bundle for base name OK_Web.langage, locale fr

Cause racine

java.util.MissingResourceException: Can't find bundle for base name OK_Web.langage, locale fr

note Les suivis de pile complets de l'exception et de ses causes principales sont disponibles dans les journaux Sun Java System Application Server 9.1_02.


Or comme je vous l'ai dit l'internationalisation fonctionne.
J'ai par la suite bêtement copié dans mes fichiers properties, ce contenu:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# ==============================================================================
# Component Errors
# ==============================================================================
 
javax.faces.component.UIInput.CONVERSION={0}: Conversion error occurred.
javax.faces.component.UIInput.REQUIRED={0}: Validation Error: Value is required.
javax.faces.component.UIInput.UPDATE={0}: An error occurred when processing your submitted information.
javax.faces.component.UISelectOne.INVALID={0}: Validation Error: Value is not valid
javax.faces.component.UISelectMany.INVALID={0}: Validation Error: Value is not valid
 
# ==============================================================================
# Converter Errors
# ==============================================================================
javax.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' must be a signed decimal number.
javax.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction.  Example: {1}
javax.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' must be a number consisting of one or more digits.
javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' must be a number consisting of one or more digits. Example: {1}
javax.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' must be 'true' or 'false'.
javax.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' must be 'true' or 'false'.  Any value other than 'true' will evaluate to 'false'.
javax.faces.converter.ByteConverter.BYTE={2}: ''{0}'' must be a number between 0 and 255.
javax.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' must be a number between 0 and 255.  Example: {1}
javax.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' must be a valid character.
javax.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' must be a valid ASCII character.
javax.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' could not be understood as a date.
javax.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' could not be understood as a date. Example: {1}
javax.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' could not be understood as a time.
javax.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' could not be understood as a time. Example: {1}
javax.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' could not be understood as a date and time.
javax.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' could not be understood as a date and time. Example: {1}
javax.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: A 'pattern' or 'type' attribute must be specified to convert the value ''{0}''.
javax.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' must be a number consisting of one or more digits.
javax.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308  Example: {1}
javax.faces.converter.EnumConverter.ENUM={2}: ''{0}'' must be convertible to an enum.
javax.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' must be convertible to an enum from the enum that contains the constant ''{1}''.
javax.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided.
javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided.
javax.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' must be a number consisting of one or more digits.
javax.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' must be a number between 1.4E-45 and 3.4028235E38  Example: {1}
javax.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' must be a number consisting of one or more digits.
javax.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' must be a number between -2147483648 and 2147483647 Example: {1}
javax.faces.converter.LongConverter.LONG={2}: ''{0}'' must be a number consisting of one or more digits.
javax.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' must be a number between -9223372036854775808 to 9223372036854775807 Example: {1}
javax.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' could not be understood as a currency value.
javax.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' could not be understood as a currency value. Example: {1}
javax.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' could not be understood as a percentage.
javax.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' could not be understood as a percentage. Example: {1}
javax.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' is not a number.
javax.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' is not a number. Example: {1}
javax.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' is not a number pattern.
javax.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' is not a number pattern. Example: {1}
javax.faces.converter.ShortConverter.SHORT={2}: ''{0}'' must be a number consisting of one or more digits.
javax.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' must be a number between -32768 and 32767 Example: {1}
javax.faces.converter.STRING={1}: Could not convert ''{0}'' to a string.
 
 
# ==============================================================================
# Validator Errors
# ==============================================================================
 
javax.faces.validator.NOT_IN_RANGE=Validation Error: Specified attribute is not between the expected values of {0} and {1}.
javax.faces.validator.DoubleRangeValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of "{0}"
javax.faces.validator.DoubleRangeValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}''
javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: Validation Error: Specified attribute is not between the expected values of {0} and {1}.
javax.faces.validator.DoubleRangeValidator.TYPE={0}: Validation Error: Value is not of the correct type
javax.faces.validator.LengthValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of ''{0}''
javax.faces.validator.LengthValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}''
javax.faces.validator.LongRangeValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of ''{0}''
javax.faces.validator.LongRangeValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}''
javax.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: Validation Error: Specified attribute is not between the expected values of {0} and {1}.
javax.faces.validator.LongRangeValidator.TYPE={0}: Validation Error: Value is not of the correct type.
 
 
# ==============================================================================
# IMPLEMENTATION DEFINED MESSAGES
# ==============================================================================
 
com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate ctor not called in same callstack as ConfigureListener.contextInitialized().
com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate already exists for this webapp.
com.sun.faces.ASSERTION_FAILED=Assertion Failed
com.sun.faces.ATTRIBUTE_NOT_SUPORTED=Attribute ''{0}'' not supported for component type ''{1}''.
com.sun.faces.CANT_CONVERT_VALUE=Can''t convert property: ''{0}'' to value type: ''{1}''.
com.sun.faces.CANT_CLOSE_INPUT_STREAM=Unable to close input stream.
com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Can''t create Lifecycle for id: ''{0}''.
com.sun.faces.CANT_INSTANTIATE_CLASS=Can''t instantiate class: ''{0}''.
com.sun.faces.CANT_INTROSPECT_CLASS=Can''t introspect class: ''{0}''
com.sun.faces.CANT_PARSE_FILE=Can''t parse file: ''{0}'': Error at line {1} column {2}: {3}.
com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Expected a child component type of ''{0}'' for component type ''{1}({2})''.  Found ''{3}''.
com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: This link is disabled as it is not nested within a JSF form.
com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Component Not Found for identifier: ''{0}''.
com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Unable to find component with ID ''{0}'' in view.
com.sun.faces.CONTENT_TYPE_ERROR=Unrecognized Content Type.
com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=Component ID ''{0}'' has already been found in the view.  See below for details.
com.sun.faces.EMPTY_PARAMETER=Parameter is empty
com.sun.faces.ENCODING_ERROR=Unrecognized Character Encoding.
com.sun.faces.ERROR_GETTING_VALUE_BINDING=Can''t get ValueBinding for value: ''{0}''.
com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value binding expression: ''{0}''.
com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Can''t set managed bean property: ''{0}''.
com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=Evaluation of expression for attribute ''{0}'' resulted in unexpected type.  Expected {1}, but received {2}.
com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Construction Error: One or more input parameters may be null.
com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=Unable to determine FaceServlet mapping for servlet path ''{0}''.
com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=The FacesServlet cannot have a url-pattern of '/*'.  Please define a different url-pattern.
com.sun.faces.FACES_CONTEXT_NOT_FOUND=No FacesContext is available to process this request.  This is most likely due to the request being sent to the wrong path.
com.sun.faces.FILE_NOT_FOUND=File Not Found for file: ''{0}''.
com.sun.faces.ILLEGAL_ATTEMPT_SETTING_STATEMANAGER=Illegal attempt to set StateManager after a response has been generated.
com.sun.faces.ILLEGAL_ATTEMPT_SETTING_VIEWHANDLER=Illegal attempt to set ViewHandler after a response has been generated.
com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Characters not allowed.
com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Illegal use of implicit object identifier in lValue mode: ''{0}''
com.sun.faces.ILLEGAL_MODEL_REFERENCE=Illegal Model Reference in this context for expression ''{0}''.
com.sun.faces.ILLEGAL_VIEW_ID=Illegal view ID ''{0}''.  The ID must begin with ''/''
com.sun.faces.INVALID_EXPRESSION=Invalid expression: ''{0}''.
com.sun.faces.INVALID_INIT_PARAM=Invalid value: ''{0}'', for initialization parameter: ''{1}''.  Acceptable values are 'true' or 'false'.  Defaulting to 'false'.
com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Invalid Message severity ''{0}'' defined in configuration.
com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId already added for id: ''{0}''.
com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId not found for id ''{0}''.
com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept either List or Array instances.
com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept Map instances.
com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Unable to set target property ''{0}'' in managed bean ''{1}''.  The target property returned an existing value that was not an instance of List.
com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''.  Managed bean contains a managed property with list entries, but has illegally defined a value and/or map entries.
com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''.  Managed bean contains a managed property with map entries, but has illegally defined a value as well.
com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''.  Managed bean contains a property containing no list or map entires, nor any value elements.
com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error performing conversion of value ''{0}'' of type ''{1}'' to type ''{2}'' for managed bean ''{3}''.
com.sun.faces.MISSING_CLASS_ERROR=Missing Class: Can''t load class ''{0}''.
com.sun.faces.MISSING_RESOURCE_ERROR=Missing Resource: Can''t get ResourceBundle.
com.sun.faces.MODELUPDATE_ERROR=Model Update failure for value ''{0}'' in model''{1}''.
com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Expression Error: Named Object: ''{0}'' not found.
com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Not nested in a UIComponentTag Error for tag with handler class: ''{0}''.
com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=The {0} tag should be nested within a tag that is associated with a component of type {1}.
com.sun.faces.NO_DTD_FOUND_ERROR=Unable to locate DTD with PUBLIC ID ''{0}'' at path ''{1}''.
com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent is null for tag with handler class: ''{0}''.
com.sun.faces.NULL_COMPONENT_ERROR=Construction Error: Component argument is null.
com.sun.faces.NULL_CONFIGURATION=No Configuration loaded for the application.
com.sun.faces.NULL_CONTEXT_ERROR=Argument Error: Context argument is null.
com.sun.faces.NULL_EVENT_ERROR=Argument Error: Event argument is null.
com.sun.faces.NULL_FORVALUE=Component "{0}" not found
com.sun.faces.NULL_HANDLER_ERROR=Argument Error: Handler argument is null.
com.sun.faces.NULL_LOCALE_ERROR=Argument Error: Locale argument is null.
com.sun.faces.NULL_MESSAGE_ERROR=Argument Error: Message parameter cannot be null
com.sun.faces.NULL_PARAMETERS_ERROR=Argument Error: Parameter ''{0}'' is null
com.sun.faces.NULL_REQUEST_VIEW_ERROR=Argument Error: Request View argument is null.
com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Argument Error: ResponseStream argument is null.
com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Argument Error: ResponseView argument is null.
com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Argument Error: ResponseWriter argument is null.
com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created.  Check your web application logs for details.
com.sun.faces.OPTION_NOT_SELECT_ITEM=Argument Error: An option for component ''{0}'' was not an instance of javax.faces.model.SelectItem.  Type found: ''{1}''.
com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId out of bounds for id: ''{0}''.
com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=State Error: RequestView has already been set for this request.
com.sun.faces.SAVING_STATE_ERROR=Error while saving state.
com.sun.faces.SUPPORTS_COMPONENT_ERROR=Argument Error: ''{0}'' is not supported for this renderer.
com.sun.faces.TYPECONVERSION_ERROR=Conversion Error setting value ''{0}'' for ''{1}''.
com.sun.faces.VALIDATION_COMMAND_ERROR=Validation error. ''{0}'' must have value or image attribute.
com.sun.faces.VALIDATION_EL_ERROR=Validation error. Expression invalid for:''{0}''
com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
com.sun.faces.CANNOT_CONVERT=Unable to resolve a Converter instance using either converterId ''{0}'' or binding ''{1}''.
com.sun.faces.CANNOT_VALIDATE=Unable to resolve a Validator instance using either validatorId ''{0}'' or binding ''{1}''.
 
 
com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cyclic reference to managed bean "{0}"
com.sun.faces.OBJECT_IS_READONLY={0} object is read only
com.sun.faces.APPLICATION_INIT_COMPLETE_ERROR_ID=ELResolvers cannot be added after the application initialization is complete.
com.sun.faces.INCORRECT_JSP_VERSION=Incorrect JSP version found, method ''{0}'' does not exist.
 
#com.sun.faces.el.PropertyResolverImpl
com.sun.faces.OUT_OF_BOUNDS_ERROR=Index {1} Out of Bounds for {0}
com.sun.faces.PROPERTY_TYPE_ERROR={0} is not Array or List type.
com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=Index {1} Out of Bounds for {0} with a length of {2}
com.sun.faces.RESTORE_VIEW_ERROR=View ''{0}'' could not be restored.
 
com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=Can''t write ID attribute: ''{0}''.
com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=Not nested in a UIComponentTag.
com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=No component associated with UIComponentTag.
 
com.sun.faces.JS_RESOURCE_WRITING_ERROR=Can''t write the JavaScript file to client.
Mais rien n'est réglé. Cela fais plusieurs jours que je suis dessus et je ne comprends rien. Le message en mode debug qui s'affiche, c'est toujours le fichier properties n'existe pas. Or il l'utilise bien pour afficher la page.