Using "pageContext.request.contextPath" for resource URLs


We use the following code in JSPX pages to refer to resource (images, css,
js) URLs:
-


<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<img src="$/images/test.jpg"/>
-



This is quite a bit more compact than <c:url> all over the place, especially
in JSP Documents (.jspx).

Questions:
1) Are there better solutions? What do others use?
2) Is there a chance that this pattern will be supported in the Demetra JSP
parser?


Please sign in to leave a comment.