you should use action instead of actionListener:
<h:commandLink id="close" action="#{bean.close}" value="Close" immediate="true"
/>
and in close method you right something like:
public String close() {
return "index?faces-redirect=true";
}
where index is one of your pages(index.xhtml)
Of course, all this staff should be written in our original page, not in the intermediate.
And inside the close()
method you can use the parameters to dynamically choose where to redirect.