JSF: output context path wirh EL in facelets page
October 31, 2011 12:54:05 Last update: October 31, 2011 12:55:45
In JSP you output the web application context path with:
Facelets are not JSPs, and there's no
But in facelets you can use
For example, a link to the root URL:
${pageContext.request.contextPath}
Facelets are not JSPs, and there's no
pageContext. So the above does not work.
But in facelets you can use
request directly:
${request.contextPath}
For example, a link to the root URL:
<a href="${request.contextPath}">Home</a>