java - 分页时,保存在session里面的对象没有办法清除。
迷茫
迷茫 2017-04-18 09:36:50
0
3
388

具体现象:::
按间和类型查询,将查询出来的信息保存在session里面,传到jsp页面。实现分页。
现在的问题是,第一次分页没有问题。当第二次分页时,保存在session里面的分页数,会带到下一次的条件查询里面。例如:第一次翻页到第6页。然后换一个条件查询,显示正常是第一页,当点击下一页时,会是第七页。页就是在之前的页数上面继续加。。而不是,从头开始。。

现在我想知道 用什么方法可以清除保存在session里面的对象信息。从而实现可以从头加的效果。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(3)
左手右手慢动作

Why is this stored in the session? It should be placed in the request, and then placed on the page. Submit it next time

If you have to do that, just reset the paging information in the session to 1 when changing the query conditions

小葫芦

Why should it be placed in the session? Just display it directly after checking out each page. There is no need to put it in the session
Up to the current page can be placed in the session

PHPzhong

That’s not what the session is for. The session stores some global things. Putting too many things will have a great impact on the server. Pagination is passed directly to the background in the request.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template