I need to use some link as argument to <spring:message /> and use <c:set/> for that. To have link relative to contextPath i use <c:url>. Why using <c:url/> in <c:set/> inside like below doesn’t 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 good:
<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 exactly something like that:
<c:set value='<a href="<c:url value="/x"/>">here</a>' var='doc1'/>
Put it in the tag body:
Or if you want XML well-formness: