is there a build-in mechanism to conditionally redirect to another view? I want the user to be redirected from the login page to the "home page" if he/she is already logged in.

I already have two basic approaches, but for the first I have no idea how to achieve and the second is sort of a dirty workaround.

1. Add `<meta http-equiv="Refresh" content="0; URL=home.jsf" />` and let it be rendered conditionally (EL : `#{login.loggedIn}`)
2. Add a `<h:panelGroup />` which will also be conditionally rendered, containing some JavaScript doing the redirect.

Is there a way to achieve *1* or even another, more elegant solution? :-)

Thanks