Matt Raible wrote:
> It there an equivalent to <%=request.getContextPath()%> in JSTL?

<c:out value="${pageContext.contextPath}" />

If, however, you want this to convert a context-relative path to
an absolute path ("server-relative"), e.g. in an HTML element,
take a look at <c:url>:

   <img src="<c:url value="/images/foo.gif" />">

turns the context-relative path into an absolute path that the
browser knows how to deal with.

Hans

-- 
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to