Search code examples
javascriptjspapplication-resource

<bean:message key='keyvalue'> does not work in js file while work perfectly in jsp file


does not work in js file while it works perfectly in jsp file. I need to display alerts in font other than english for which i am making use of the applicationResource.properties file. It is working perfectly in jsp file but does not work with js file. Is there any solution for the same.Please help.! ! ! ! !


Solution

  • Declare any global variable in jsp file and pass your bean message key inside that. And then pass this value in alert box inside JS file.