I need to use some link as an argument for <spring:message />and use for this <c:set/>. To have a link regarding contextPath, I use <c:url>. Why is the use <c:url/>in the <c:set/>inside, as shown below, does not work?
<c:set value='<c:url value="/x"/>' var='doc1'/>
<spring:message code="doc.link" arguments="${doc1}"/> <%-- ${doc1} is empty --%>
Simlar using <a href/>works well:
<c:set value='<a href="/fullurl/x">here</a>' var='doc1'/>
<spring:message code="doc.link" arguments="${doc1}"/>
messages.properties:
doc.link = Doc is {0}
EDIT
I need to work just like this:
<c:set value='<a href="<c:url value="/x"/>">here</a>' var='doc1'/>
source
share