How can I open a link from bean?I will open something like http://www.google.de.It should open the directory.
How can I open a link from bean?I will open something like www.google.de.It should
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.
You can’t open a link from a bean. A link requires enduser interaction.
Rather tell the browser directly to send a new GET request on the given URL. You can use
ExternalContext#redirect()for this.This makes however no sense if that’s the sole action of the bean. Rather use
<h:outputLink>or just<a>instead of<h:commandLink action="#{bean.action}">or something.