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.
Minimum of Java 7 and Thymeleaf 3 required.
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.
Add a dependency to your project with the following co-ordinates:
nz.net.ultraq.thymeleaf
thymeleaf-template-servlet
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.