I'm using GlassFish 3.1.2.2 and I want to define a generic validation message template to not include field identifier/label.
I've found couple of related topics on StackOverflow but none of these solutions (all involving javax.faces.validator.BeanValidator.MESSAGE) is working.
1) placing ValidationMessages.properties in root of classpath (in my case it was placed in WEB-INF/classes of my WAR file) - no effect
2) defining the ValidationMessages.properties file in <message-bundle> in faces-config.xml - no effect
3) defining the ValidationMessages.properties file in <resource-bundle> in faces-config.xml - no effect
I tested that resource bundle is correctly working as I can use it in EL, example: #{text['javax.faces.validator.BeanValidator.MESSAGE']} where text is my var from resource-bundle definition.
NOTE: I don't want to give validatorMessage attribute on each of input fields in my application. I just want to setup my custom message once for whole application.
IMPORTANT: the solution presented here Mkyong.com is not working as well.
NOTE: I'm declaring to use JSF 2.0 and Glassfish 3.1.2.2 certainly supports that. NOTE: I don't want to implement validation in managed bean instead of using JSF validation/Bean Validation.