Using ThymeLeaf with Undertow Core (no servlets)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using ThymeLeaf with Undertow Core (no servlets)


I am trying to integrate ThymeLeaf engine in my micro-service app that only uses Undertow Core.

When I use the @ rule for css, e.g.

<link rel="stylesheet" type="text/css" th:href="@{/css/app.css}" />

I get this error:

Caused by: org.attoparser.ParseException: Link base "/css/app.css" cannot be context relative (/...) unless the context used for executing the engine implements the org.thymeleaf.context.IWebContext interface (template: "/template.html" - line 8, col 44)

I don't want to include servlet engine into my app, so is there a way to circumvent this error?