开发者

How to JSF redirect after few seconds

开发者 https://www.devze.com 2023-01-23 22:34 出处:网络
I have one method on JSF Managed Bean, i want after user call method, and it do some business logic ,after that it will redirect some 2 seconds after some business logic complete. When business logic

I have one method on JSF Managed Bean, i want after user call method, and it do some business logic ,after that it will redirect some 2 seconds after some business logic complete. When business logic complete on 9:30:20 after that 9:30:22 page will redirect. How can i do on JSF Managed Bean?

开发者_C百科

Thank You!


It's not possible to control the client from the server side on. Your best bet is to handle it entirely at the client side. The most straightforward approach would be using a meta refresh header in the HTML <head> of the result page.

<meta http-equiv="refresh" content="2;url=newpage.jsf" />

The above instructs the client to refresh the page after 2 seconds with the URL newpage.jsf.

0

精彩评论

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