I want to print elements from an array using a foreach loop that gives an error . The j prefix for the j: foreach element is not associated . "
Below is the code I wrote:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<h1>Jello World </h1>
<g:evaluate>
var words=['Hello','world','bye'];
</g:evaluate>
<j:foreach var="jvar_word" items="${words}">
<p> ${jvar_word} </p>
</j:foreach>
</j:jelly>
source
share