![](/img/trans.png)
[英]Best way to call one custom JSP tag from inside another custom JSP tag?
[英]Spring JSP, one tag inside another
我想将<s:message code="active.from" />
放入另一个标签的pattern
参数中,如下所示:
<fmt:formatDate value="${campaignPerDay[0].date}"
pattern="<s:message code="active.from" />"
/>
然而它以
org.apache.jasper.JasperException: /WEB-INF/views/active.jsp(200,106) equal symbol expected
我尝试了一些反斜杠变体,但无济于事。
我用以下方法解决它(但是我不知道,如果它是最好的解决方案):
<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.