这就是我想要做的:用户上传一堆html文件作为zip压缩文件。我解压该档案并在网站上显示html内容。包含用户上传的html文件
为此,我想将html内容包含在thymeleaf页面中。到目前为止,我已经试过这样:
<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>
在所有这三种情况下,我得到以下错误(具有不同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)
我将如何得到这个工作?我只看到了包含template
文件夹中的静态文件的示例。但那不是我想要做的。
我使用Wildfly 9和standalone/data
文件夹我创建了uploads
文件夹。
感谢您的回复,我编辑了我的问题。 – user3813234