Logic-less and semantic templates with Java

by Edgar Espina Theme by mattgraham

Prototype your web sites with Handlebars.java!

In this section you will learn to prototype web sites using the Handlebars.java Server!


Just click here for download the file.


  java -jar handlebars-proto-1.0.0.jar [-option value]

The Java Runtime Environment must be installed. In case you don't have one installed already, you can download and install from here.


Starting the server

  java -jar handlebars-proto-1.0.0.jar -d site
Open a browser and type:

So, is that all? No, the next section teach you how to add data to your templates.

Data Sets

  • as JSON
      "blogs": [
        }, {
        }, {
  • as YAML
      - name: Handlebars.java
      - name: Handlebars.js
      - name: Mustache

By default the data file must match the template name and must be in the same directory.

You can specify a different data set by using thedataparameter in the url.

Thedataparameter is a file path without a file extension.

Error reporting

Handlebars.java errors are reported through a very nice HTML page.


The Handlebars.java Server is a nice tool for prototyping web sites.

Data can be provided in two very user friendly formats and it has an excellent error reporting tool, these two features make ideal Handlebars.java for web designers.

Cool, isn't?

Want to contribute?

  • Fork the project on Github.
  • Create an issue or fix one from the issues list.
  • Share your ideas or ask questions on mailing list - don't hesitate to write a reply - that helps us improve javadocs/FAQ.
  • If you miss a particular feature - browse or ask on the mailing list - don't hesitate to write a reply, show us a sample code and describe the problem.
  • Write a blog post about how you use or extend Handlebars.java.
  • Please suggest changes to javadoc/exception messages when you find something unclear.
  • If you have problems with documentation, find it non intuitive or hard to follow - let us know about it, we'll try to make it better according to your suggestions. Any constructive critique is greatly appreciated. Don't forget that this is an open source project developed and documented in spare time.

Thank you, for reading the Handlebars.java blog.