簡體   English   中英

在另一個標記中使用jsp fmt標記

[英]Using a jsp fmt tag in another tag

我希望能夠在另一個標記中包含fmt標記的返回值:

<local:roundedBox boxTitle="<fmt:message key="somekey"/>">
content
</roundedBox>

我多次遇到這個問題,它似乎是jsp的一個愚蠢的限制。 有一個簡單的方法嗎?

使用中間變量來存儲結果(代碼未測試)

<fmt:message key="somekey" var="formattedvarname" />
<local:roundedBox boxTitle="${formattedvarname}">
content
</roundedBox>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM