Map (java.util.Map) in java is used to keep a key value pair. Though map.put consider both key and value as object. But if anyone want to send a map with a key as int for view in FreeMarker (*.ftl file) it can not resolve the value of the map by ${map[key]}. Though your java code works fine with int key but FreeMarker generate error message in following way,
Exception:
Expected number, sequence, or string. messageMap evaluated instead to freemarker.template.SimpleHash on line XX,
The easiest way to get out of this error is just to make the key to string by using the command .toSting() in java code. This works fine with *.flt.
By: Md. Shahjalal
23.783439
90.393938