Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to JSF redirect after few seconds

Tags:

jsf

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?

Thank You!

like image 672
MYE Avatar asked Nov 09 '10 02:11

MYE


1 Answers

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.

like image 148
BalusC Avatar answered Jan 15 '23 03:01

BalusC