Views

HTML template engines

Spring Boot natively supports the following template engines:

  • Thymeleaf - mostly used special attributes, so you can verify changes of html template immediately in browser with default data. Implemented on Java. Used expression language is much more powerful than JSP expression language. Follow link to read more about Thymeleaf syntax.
  • FreeMarker - has powerful template language.
  • Groovy - provides different template engines.
  • Mustache - heavely uses {}, logic-less, has implementation for 30 languages.

It is possible to configure your application for using several template engines.

java server page

JSP allows you to mix html code with Java code. JSP uses special tags, most of which start with <% and end with %>.

It looks like an HTML template engine, but it will actually be compiled into a servlet. Therefore, to check the changes in the .jsp file, you need to restart the application.

One of the big advantages of jsp was speed, but this is not so important at nowadays.