JSP 標準標籤庫(JSP Standard Tag Library,JSTL)是一個實現 Web應用程序中常見的通用功能的定製標記庫集,web
引用引用thymeleaf解析器作靜態標籤不會有JSP標籤。spring
localhost先訪問Controller
post
Spring 默認提供了多種視圖解析器,好比,咱們能夠使用最經常使用解析器 InternalResourceViewResolver 來查找 JSP 視圖(與之相對應的視圖類爲 InternalResourceView)。一般,一個視圖解析器只能查找一個或多個特定類型的視圖,在遇到 Spring 不支持的視圖或者咱們要自定義視圖查找規則的狀況下,咱們就能夠經過擴展 Spring 來自定義本身所需的視圖解析器。目前,視圖解析器都須要實現接口 org.springframework.web.servlet.ViewResolver, 它包含方法 resolveViewName,該方法會經過視圖名查找並返回 Spring 視圖對象。在 Spring 中,全部的視圖類都須要實現接口 org.springframework.web.servlet.view.View,Spring 還提供了多個實現了 View 接口的抽象類,因此咱們並不須要直接實現接口 View, 而是能夠實現 Spring 所提供的抽象類。spa
<form action="init" th:object="${userBean}" method="post">orm
刪除:htm
<table>對象
<tr>接口
<td><a th:href="@{delete?(userId=${userInfo.userId})}"> <span th:text="${userInfo.userId}"></span></a></td>ci
<td><span th:text="${userInfo.userName}"></span></td>get
</tr>
</table>
刷新:
public String deleteLogin(UserBean userBean, Model model) {
int result = helloWorldService.deleteUser(userBean);
List<UserBean> refresh = helloWorldService.searchUser(userBean);
model.addAttribute("list", refresh);
return "login";
}