Redirect to external URL in JSF

Either just mention the URL directly in <a> or <h:outputLink>. <a href=”https://stackoverflow.com”>Go to this site!</a> <!– or –> <h:outputLink value=”https://stackoverflow.com”>Go to this site!</h:outputLink> Or, if you need to to invoke a bean action using <h:commandLink> like below, <h:form> <h:commandLink value=”Go to this site!” action=”#{bean.redirect}” /> </h:form> then use ExternalContext#redirect() in action method. public void redirect() … Read more