trouble with mustache templates

946 views
Skip to first unread message

Veljko Skarich

unread,
Dec 9, 2012, 10:33:24 PM12/9/12
to dropwiz...@googlegroups.com
Hi everyone, 

I've been trying to get mustache templates working recently, and I'm running into this error at runtime: 

Caused by: ! com.github.mustachejava.MustacheException: Template /com/example/helloworld/views/post.mustache not found

Of course, I do have the the post.mustache file, and its location. The PostView.java file that references post.mustache is at  /com/example/helloworld/views/PostView.java The only thing I can think of is that /com/example/helloworld/views/post.mustache is still a relative path, whereas the fully qualified location of my template file is src/main/java/com/example/helloworld/views/post.mustache

Anyone have mustache templates working successfully? Maybe I am missing something obvious here. 

thanks,

Veljko

Veljko Skarich

unread,
Dec 9, 2012, 10:42:36 PM12/9/12
to dropwiz...@googlegroups.com
ha. ok solved it. so in the example docs for views, where it says the template will be at 

src/main/resources/com/example/service/person.mustache  

that is exactly where the template will be expected to reside, i.e. even though src/main/resources may not be your exact directory tree for your view. 
Reply all
Reply to author
Forward
0 new messages