I’ve been dealing with a problem with JSF, when it comes to redirect to pages inside my app it works just fine, but I haven’t been able to redirect to external URL can some one guide me on this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Either just mention the URL directly in
<a>or<h:outputLink>.Or, if you need to to invoke a bean action using
<h:commandLink>like below,then use
ExternalContext#redirect()in action method.Note that you don’t need to catch that
IOException, the server will deal with it. Also note the importance of including the scheme (https://orhttp://or//) in the URL, otherwise it will be interpreted relative to the current domain.