Re: Nested tag in attribute value

Eric Haszlakiewicz <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <[email protected]>
On Tue, Jul 03, 2007 at 09:59:59AM -0400, Kris Schneider wrote:
> As you've discovered, embedding one tag in the attribute value of another tag is
> "illegal" - even if you had gotten the quotes right ;-). You would need to do
> something like:
> 
> <bean:define id="categoryId" name="category" property="id"/>
> <mt:clink url='<%= "/categoryEvent.do?event=edit&id=" + id %>'>Edit</mt:clink>
> 
> I think. It's been awhile since I've been down that road...

In a more general sense, you can capture the output of anything with the 
c:set tag:

<c:set var="somevar">lalala<my:tag/> <other:tag/> etc... </c:set>

And then just use ${somevar} whereever you need the value.  (no need for
scriptlets either)

eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.