I need to cache #{request.contextPath}
into a variable so that it could used multiple times within a page. Previously while I was working with Mojarra 2.1.3, I could use ui:param
for this purpose & that would cache the expression value for entire page & across all the included pages in the current page. But it doesn't work with Myfaces(see issue) reason being <ui:param>
should be direct child of <ui:include>
or <ui:define>
to work.
I have been suggested to use c:set
but I want to avoid working with JSTL tags as far as possible. What is recommended for my use case ?