JSF: output context path wirh EL in facelets page 

Joined:
08/13/2009
Posts:
153

October 31, 2011 12:54:05    Last update: October 31, 2011 12:55:45
In JSP you output the web application context path with:
${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>
Share |
| Comment  | Tags