[英]Spring JSP, one tag inside another
I want to put value of <s:message code="active.from" />
into pattern
parameter of another tag like this:我想将<s:message code="active.from" />
放入另一个标签的pattern
参数中,如下所示:
<fmt:formatDate value="${campaignPerDay[0].date}"
pattern="<s:message code="active.from" />"
/>
However it ends with然而它以
org.apache.jasper.JasperException: /WEB-INF/views/active.jsp(200,106) equal symbol expected
I tried some backslashing variations, but it does not help.我尝试了一些反斜杠变体,但无济于事。
I solve it with following (however I do not know, if it is the best solution) :我用以下方法解决它(但是我不知道,如果它是最好的解决方案):
<c:set var="dateformat" scope="page"><s:message code="general.dateformat" /></c:set>
<fmt:formatDate value="${campaignsPerDay[0].date}" pattern="${dateformat}" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.