Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

JSF%20Interview%20Questions%20and%20Answers

Question: How to add context path to URL for outputLink?
Answer: Current JSF implementation does not add the context path for outputLink if the defined path starts with '/'. To correct this problem use #{facesContext.externalContext.requestContextPath} prefix at the beginning of the outputLink value attribute. For For Example:
<h:outputLink value=”#{facesContext.externalContext.requestContextPath}/myPage.faces”> 



Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook