I have the following method annotated with @ModelAttribute
@ModelAttribute(value = "getRelatedNames")
public Map<String, String> getRelatedFormNames(String value) {
// Logic to get and return the related names
}
How can I send the value
String from the jsp? I have tried
<c:forEach var="nameMap" items="${getRelatedNames('testString')}">
<option value="${nameMap.key}">${nameMap.value}</option>
</c:forEach>
and
<c:forEach var="nameMap" items="${getRelatedNames(value = 'testString')}">
<option value="${nameMap.key}">${nameMap.value}</option>
</c:forEach>
but I get the following error:
The function getRelatedNames must be used with a prefix when a default namespace is not specified