How to JSF redirect after few seconds
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
.
精彩评论