[英]Using a jsp fmt tag in another tag
I'd like to be able to include the return value of a fmt tag in another tag: 我希望能够在另一个标记中包含fmt标记的返回值:
<local:roundedBox boxTitle="<fmt:message key="somekey"/>">
content
</roundedBox>
I've run into this problem multiple times and it just seems like a stupid limitation of jsp. 我多次遇到这个问题,它似乎是jsp的一个愚蠢的限制。 Is there a simple way around this? 有一个简单的方法吗?
Use an intermediate variable to store the result like this (code not tested) 使用中间变量来存储结果(代码未测试)
<fmt:message key="somekey" var="formattedvarname" />
<local:roundedBox boxTitle="${formattedvarname}">
content
</roundedBox>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.