When we try to display a label from a properties file, using spring tags, we can write:
If the message is a JavaScript string literal, such as in
<script>
function sayI18nedHello() {
alert('<spring:message javaScriptEscape="true" code="hello" />');
}
</script>
Then you need this attribute, which will escape the single and double quotes, the newline chars, the tabs, etc. in order to make sure that the generated JavaScript is valid.