I have a code like this on my JavaScript file x.js
alert("<spring:message code='plants.selectedPlant.name' javaScriptEscape='true' />");
In a file messages.properties
I have the line:
plants.selectedPlant.name = Roses
But it just alerts the text <spring:message code='plants.selectedPlant.name' javaScriptEscape='true' />
but not the value.
I'm not importing anything on my JS file.