How to build a URL in the JSF page?

I'm trying to create a <a> tag in my Facelets XHTML page, but can't understand how to do it.. This is what I'm doing:

<h:outputLink value="static/faq.xhtml">FAQ</h:outputLink>

Am I using the right tag?

Answers


This should work. Open page in webbrowser, rightclick and View Source to see the JSF-generated HTML output. You should see a <a> element being generated.

To learn what HTML the JSF components are rendering, head to the tag documentation. Here's a cite of relevance of the one for <h:outputLink>:

Render an HTML "a" anchor element. The value of the component is rendered as the value of the "href" attribute.


Simply use <a href="static/faq.xhtml">FAQ</a>.


Need Your Help

Trying to call for a specific method - routing error

ruby-on-rails model-view-controller ruby-on-rails-3.1 routing actionview

I have user and product models. User's table has a "discount" field. I trying to call method "apply_discount" from users/index view, which multiplies all prices and given discount.

How to remove the "." from a decimal figure with jQuery

javascript jquery

I am new to JS and trying to remove the full stop from the returned number, I've managed to work out removing the thousand separator but not sure how to add to also remove the full stop. Anyone hav...