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";
}