Mustache.js on Nashorn

Iñigo Telleria inigo at
Mon Jan 23 22:24:25 UTC 2017


I'm trying to compare the performance of Mustache Java Implementation ( and Mustache JavaScript ( on JVM. Developing a web application
to compare them, ,
I've found an issue that I can't solve.

I've got a Todo bean which is a Java class and I want to render it using a
Mustache.js template. If the template receives a Todo object as a simple
param, the value is printed correctly. For example this param works fine

However, when the template receive a Todo list, the values are empty. For
example, this list is rendered with empty values:

I'm not sure if this issue is related to Nashorn engine or Mustache
Javascript framework, because using different versions of Mustache (0.8.2
or 2.3.0) I've got different results. With the lowest version the template
is rendered correctly but not with the highest.

Any advice would be highly appreciated.

Thanks in advance.

Iñigo Telleria

More information about the nashorn-dev mailing list