Jooby and Handlebars-java : Basic customization does not work

12 views
Skip to first unread message

niko...@brightminds.org

unread,
Nov 22, 2020, 4:52:23 AM11/22/20
to jooby-project
I have a controller and a basic template home.hbs which works fine when I have:
install(new HandlebarsModule());

But if try to create a Handlebars class and inject that into the install as per https://jooby.io/modules/handlebars/ as follows:
Handlebars handlebars = new Handlebars();
install(new HandlebarsModule(handlebars));

This fails with:
Not Found
message: /home.hbs.hbs
status code: 404

Why the .hbs.hbs and how to resolve??????

--Nikolaos

niko...@brightminds.org

unread,
Nov 22, 2020, 6:18:05 AM11/22/20
to jooby-project
I found another way...

install(new HandlebarsModule());
Handlebars handlebars = this.getServices().get(Handlebars.class);

Perhaps docs should be updated as what is documented in https://jooby.io/modules/handlebars/ does not work in Jooby 2.x

--Nikolaos
Reply all
Reply to author
Forward
0 new messages