1.搜索
select * from tb_user where username like “%?%”
2.分页
pojo pageinfo 5
currentpage
size
list
totalpage
totalcount
dao
1.limit 查询要展现的数据
2.count 计算总条数
service
new pageinfo
servlet
实现跳转
页面展现
request.getRequestDispatcher("/findByPage").forward(request,response);
转发 一次请求
response.sendRedirect("/findByPage");
重定向 2次请求
本文详细介绍如何使用SQL进行模糊搜索及分页操作,包括利用通配符进行模糊匹配,以及通过limit和count函数实现数据分页展示。同时,探讨了在服务层和服务接口中如何整合分页信息,并在Servlet中实现请求的转发与重定向。

被折叠的 条评论
为什么被折叠?



