Thymeleaf

62 阅读1分钟

Thymeleaf

视图模板技术

JavaWeb教程目录 | 代码重工 (gitee.io)

图片转存失败,建议将图片保存下来直接上传

6. thymeleaf的部分标签
   1) 使用步骤: 添加jar , 新建ViewBaseServlet(有两个方法) , 配置两个<context-param> : view-prefix , view-suffix
   2) 部分标签: <th:if> , <th:unless> , <th:each> , <th:text>
7、Thymeleaf-视图模板技术
(1)添加thymeleaf的jar包
(2)在web.xml文件中添加配置
(3)新建一个Servlet类ViewBaseServlet
(4)使得我们的Servlet继承ViewBaseServlet

图片转存失败,建议将图片保存下来直接上传