开发者

Staying on the same page in Spring

开发者 https://www.devze.com 2023-03-26 04:36 出处:网络
I\'m using Spring and would like to find out if 开发者_如何学运维there is some technique that can be used to stay on the same page.So, to be more clear, after you click on a link and the handler execu

I'm using Spring and would like to find out if 开发者_如何学运维there is some technique that can be used to stay on the same page. So, to be more clear, after you click on a link and the handler executes, there is some condition which dictates that the browser should remain on (or be redirected/forwarded to) the page the browser was currently on. Beehive, which is built on top of Struts, has a way to do this and I'm wondering if Spring has something similar.


It really depends on the use case. Are you submitting a form or something similar that could be submitted through XHR instead? If you can't use XHR, a simple solution is to have the controller return a view to the current page, possibly with some additional state information.

0

精彩评论

暂无评论...
验证码 换一张
取 消