Using jsp fmt tag in another tag

I would like to include the return value of the fmt tag in another tag:

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

I ran into this problem a few times and it just seems like a silly jsp restriction. Is there an easy way around this?

+4
source share
1 answer

Use an intermediate variable to store a result like this (code not verified)

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

All Articles