Hi,
I have the following situation. I'm using JBoss EAP 6.2 and want to deploy two applications:
appl1.jar and appl2.ear
(appl2.ear depends on appl1.jar. appl1.jar is a common application which may be used by other applications, too.)
appl1.jar has a ValidationMessages.properties file under jar/WEB-INF/classes
with the content:
missing_sender = Please provide a sender adress.
appl2.jar has a ValidationMessages.properties file under ear/web/WEB-INF/classes as well. Its content is:
page_field_empty = The field is empty.
If I start the server and validate some input, e.g. check if a field contains data, then I got as error message:
{page_field_empty} instead of "The field is empty".
The logic for this validation is located within a folder (ear/biz/) in the appl2.ear. The used Validator is obtained by:
Code:
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
validator = factory.getValidator();
If I debug all keys of the file ValidationMessages.properties, it only returns as known keys:
missing_sender
I.e. the keys from the ValidationMessages.properties from the jar file: appl1.jar. Thus, the key {page_field_empty} is unknown and the key instead of the value is returned.
So:
How it is possible to load ValidationMessages.properties in its own "context"?
Why does the ear/ValidationMessages.properties file got overwritten by the jar/ValidationMessages.properties?Thanks for any suggestions and help in advance.
Best regards,
jondoe