![](/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.