Tuesday, 7 May 2013

How to add context path to URL for outputLink? | JSF Interview Questions

Current JSF implementation does not add the context path for outputLink if the defined path starts with '/'. To correct this problem use
#{facesContext.externalContext.reuestContextPath} prefix at the beginning of the
outputLink value attribute.
For example:
<h:outputLink value="#{facesContext.externalContext.reuestContextPath}/myPage.faces">


No comments: