'Expression language evaluates properly in local but doesn't work when I deploy my application
I have a JavaScript array in my JSP file that gets its contents from a Java array. It looks like this:
var myArray = [];
<c:forEach items="${myList}" var="i">
myArray.push("${i}");
</c:forEach>
I am able to print out the contents of the array via this code when I run the code locally in intellij.
myArray.forEach(function(i) {
console.log(i);
});
However, all of this stops working once I deploy my application. When I deploy my application, console.log() prints nothing. The array is just empty.
I tried fixing it by adding <%@ page isELIgnored="false" %> to the top of my JSP file but that didn't do anything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
