1

I want to load the values in applicationResources.properties in jsp dynamically. ApplicationResource.properties would be like this.

message=Message for invalid password.

i did like the following code to retrive the value from property file in jsp.

<fmt:message key="message" var="msgTooltip"/>
<form:password path="password" id="password" showPassword="true" data-toggle="tooltip" data-placement="right" title="${msgTooltip}"/>

The intention of above code is to get value from property file and display value in tooltip when corresponding field is hovered.

As a result i will get value as "Message for invalid password" in tooltip.But i need to get the message as "invalid password".

I tried some solution.But nothing makes it.Please some one help me to get it.

I tried like this...

var msgTooltip="<fmt:message key="message"/>";
msgTooltip = msgTooltip.slice(12);
Pravin
  • 645
  • 3
  • 7
  • 21

1 Answers1

0

You can't have double quotes in your double quotes. I'd try something like the following:

var msgTooltip='<fmt:message key="message"/>';
Matt Raible
  • 8,187
  • 9
  • 61
  • 120