1、導入標籤庫
在Jsp頁面的頂部位置導入
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%--jstl--%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%--標籤庫--%> <%@ taglib prefix="f" uri="http://www.springframework.org/tags/form" %> <html> <head> <title>測試頁面</title> </head> <body> <h3>測試輸出</h3> </body> </html>
2、標籤
2.1、form
綁定Model中某個對象到當前form中上,在form內部的標籤中可以通過path直接引入該對象內的屬性。