Reputation: 21
is resulting nothing. Here is my code....
src/validationMessages.properties fname.error=First name is mandatory.
Spring-servlet.xml messagesource is configured with basename = validationMessages
Jsp code as mentioned above and jQuery as follows.... Rules:{ firstname: "required" }, Messages:{ firstname:{ required: "" }
jsp taglib tag is included......
But the tag renders nothing...........required: " "
Any advice.?
Upvotes: 2
Views: 4086
Reputation: 368
I don't know much about springs but you can try this. I've used the same to catch the values in Struts2 mvc
$(document).ready(function() {
var message='<spring:message code="${error.code}" text="${error.defaultMessage}"/>'
alert(message);
});
Upvotes: 1