JSF OutputLink Example


The JSF h:OutputLink in useful to navigate a page outside of the Web application. The outcome attribute needs complete Web page name or the URL; For example, ‘Home.xhtml’ and not accept viewID like ‘Home’.

JSF Outputlink renders an anchor tag in the browser like below

JSF => <h:outputLink value=”www.google.com”>Google</h:outputLink>

HTML => <a href=”http://www.google.comtarget=”_blank”>Google</a>

JSF h:Outputlink Example

Below is the index.xhtml page contains two h:outputlink tag. First one navigates outside of the application and second one navigate to Home.xhtml page. If I not mentioned the http in the first URL then JSF will append the URL at the end of the application URL .





It renders in the browser like below. 


JSF_Outputlink_Example JSF OutputLink Example


Download the Source Code:

govindan JSF OutputLink Example
Connect me


Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan JSF OutputLink Example
Connect me
By | 2017-11-19T23:40:59+00:00 November 19th, 2017|Categories: JSF|Tags: , , , |Comments Off on JSF OutputLink Example
Like us on Facebook.