tags:

views:

530

answers:

1

I'd like to be able to include the return value of a fmt tag in another tag:

<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. Is there a simple way around this?

+5  A: 

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>
Simon Groenewolt
Ah! I didn't know you could do that with a fmt tag. Thanks :-)
Akrikos
If this answers your question please mark it so - that way the system will know it's answered and not just you. (And I get some points I guess, which is also supposed to be nice ;-)
Simon Groenewolt