This it what I would like to do: A user uploads a bunch of html files as a zip archive. I unzip that archive and display the html content on the website.
For that, I would like to include the html content into a thymeleaf page. I have tried this so far:
<div th:include="http://localhost:8181/MySpringApp/uploads/include.html"></div>
<div th:include="@{/uploads/include.html}"></div>
<div th:include="@{~/uploads/include.html}"></div>
In all three cases I get the following error (with varying URL):
Exception processing template "dashboard": Error resolving template "/uploads/include.html", template might not exist or might not be accessible by any of the configured Template Resolvers (dashboard:40)
How would I get this to work? I have only seen examples of including static files from the template
folder. But that's not what I would like to do.
I am using Wildfly 9 and in the standalone/data
folder I have created the uploads
folder.
The code like this should work: