ultraq / thymeleaf-template-servlet

Standalone servlet for serving Thymeleaf templates
Apache License 2.0
1 stars 1 forks source link

Thymeleaf Template Servlet

GitHub Release Maven Central License

Standalone servlet for serving Thymeleaf templates.

Mainly useful for testing or prototypes, this Servlet API 3.0 web fragment project will map all *.html requests to the Thymeleaf template of the same name.

Installation

Minimum of Java 7 and Thymeleaf 3 required.

Standalone distribution

Copy the JAR from the latest release bundle, placing it in the classpath of your application, or build the project from the source code here on GitHub.

For Maven and Maven-compatible dependency managers

Add a dependency to your project with the following co-ordinates:

Usage

Once your web app starts up (and provided you haven't disabled servlet annotations), then the template servlet will start mapping any requests for HTML files to templates of the same name in your project, eg: a request for hello.html will then cause the template servlet to respond with hello.html from your web app project folder.