17th
May
Thymeleaf Interview Questions

Thymeleaf Interview Questions

  • Kanak Singh
  • 17th May, 2022
  • 658 Followers

Thymeleaf Interview Questions

1) What is Thymeleaf?

Thymeleaf is a modern server-side Java template engine for both web and non-web environments. It generally works to bring natural templates to your development workflow.

2) List major features of Thymeleaf?

The major features of Thymeleaf are:

  • Based on modular feature sets called dialects
  • Several template modes
  • Java template engine for XML, XHTML and HTML5
  • Full (and extensible) internationalization support
  • Works both in web and non-web (offline) environments.

3) What is Thymeleaf Template?

Thymeleaf Template is the template files that can be directly opened in browsers and that still display correctly as web pages.

4) What is fragment in Thymeleaf?

In Thymeleaf a fragment is a small piece of code such as reusable, small components like the header, footer, navigation menu, etc. that can be included in other templates.

5) What is a dialect in Thymeleaf?

There are two types of dialects in Thymeleaf that states:

Custom dialects – you can build layouts using the Thymeleaf Standard Layout System

Layout Dialect – which uses the decorator pattern for working with the layout files.

6) List different kinds of templates can Thymeleaf process?

The different kinds of templates that Thymeleaf process are:

  • HTML (HTML5, XHTML 1.0/1.1, HTML 4)
  • XML
  • TEXT (plain text)
  • JAVASCRIPT (. js files)
  • CSS (. css files)

7) What is Decoupled Template Logic?

Decoupled Template Logic allows for the creation of completely logic-less markup templates in the HTML and XML. It introduces the possibility to completely decouple the template's markup from its logic.

8) List some companies using Thymeleaf?

Some of the companies that are using Thymeleaf are:

  • Craft base
  • Hamburg
  • Deutsche Kreditbank
  • Tech-Stack.
  • productdevelopment
  • java
  • E. Breuninger GmbH
  • Martech

9) What is Template Resolver in Thymeleaf?

In Thymeleaf the Template Resolver is responsible for loading the templates from a specific location.

10) What are OGNL expressions?

OGNL stands for Object-Graph Navigation Language which is an open-source Expression Language used in java as it simplifies the accessibility of data stored in the ActionContext.

11) Explain Safe Navigation Operator in Thymeleaf?

In Thymeleaf, the safe navigation operator is used to check whether the reference to an object is null or not, before accessing its fields and methods.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.