Is there a way to handle JSTL tags (fmt:) within a JavaScript response-handler function? For instance:
- I am trying to switch languages via AJAX, therefore I need to update my tool panel using JavaScript and process fmt:setLocale in the response-handler function
- When updating select dropdown menus via AJAX for localization purposes, how can I utilize fmt:message in JavaScript?
However, the JSP engine does not handle .js files. This is causing issues with the following code:
document.findElementById("div1").innerHTML = "<fmt:message key="word_from_DB"/>";
document.findElementById("div2").innerHTML = "<fmt:setLocale value="en"/>";
Question: What are some alternative methods to process these tags from JavaScript or where should I look for solutions?