From: Michael Müller <>
Date: Fri, 13 Apr 2012 18:01:24 +0200

h:link renders an "a" element and if disabled is true, a "span" element.

Ok, I wanted output internal as well as external links. Here's what I did:

<h:link outcome="#{sessionTools.encodeResourceURL(reviewLink.url)}" value="#{reviewLink.description}"
         target="#{reviewLink.url.toLowerCase().startsWith('http') ? '_blank' : '_self'}"/>

For url="/review.xhtml?reviewId=5 <view-source:http://localhost:8080/Books/review.xhtml?reviewId=5>" I'll get a link as expected:
<a href="/Books/review.xhtml?reviewId=5 <view-source:http://localhost:8080/Books/review.xhtml?reviewId=5>"target="_self"></a>

But using an external link like " <view-source:>" JSF recognizes this is not a link to the own app. I supposed it will render this link as is but I got a "span":

<span target="_blank">Extern</span>

Is this by intention or is this a bug?

Herzliche Grüße - Best Regards,
Michael Müller