Hi. I am displaying error messages via the <h:messages> tag, but this strange prefix shows up with the message:
j_id_jsp_1488097600_1:formField3: Validation Error: Value is less than allowable minimum of '5'
How can I suppress the j_id_jsp_1488097600_1:formField3: prefix, and what causes it to be displayed? Do I have something specified incorrectly? The tag in my JSP looks like this:
Thanks for replying, Bob. I have the following in faces.config to reference my custom messages:
And then I have the application.properties file which resides in that package. The messages are being picked up correctly, I just don't understand why I am getting the extra verbage on the message...
Hmmm. I tried adding all of your messages to my message bundle, but I got the same result... I also tried this, which got rid of the prefix, but now the replacement variable '{0}' does not get replaced with the minimum size inside of the message string. I also tried using '{1}' inside the message string:
create a separate properties file for the java message bundle, and add to faces config like this. Works for me, and the message are overridden properly, and I can change the ones I do not like. [ March 07, 2008: Message edited by: Bob Good ]
Bob - Thank you very much. Before reading your last post, I realized that the weird prefix seems to be caused by having my variable markers enclosed by single quotes '{0}' instead of double quotes i.e.) "{0}". The second thing is that I needed to have the message-bundle entry in the faces config also (just as you were saying). So my faces.config now looks like: