This construct works for me, as in, it actually navigates to /index
. Only the view params disappear from the URL because you're forcing a redirect. But there is more, the <h:commandButton>
is here essentially the wrong tool for the purpose. You want pure page-to-page navigation. You should then not be using a command link/button at all, but a plain link/button. You need <h:button>
.
<h:button value="Home" outcome="/index" includeViewParams="true" />
Note: this doesn't require any form.