File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes tags as other tags' attribute value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tags as other tags Watch "tags as other tags New topic

tags as other tags' attribute value

Kaiser Lautern

Joined: May 11, 2005
Posts: 18
Hi, people,

Maybe this is a recurring question but I didn't manage to find the right keywords, so I'm gonna (re)post it.

I learned that custom tags don't accept other tags as their attribute values. So I can't write something like:

<myTag rocess att1='<bean:write name="att1id"/>'
att2='<bean:write name="att2id"/>'
att3 ='<bean:write name="att3id"/>'
Is that correct?

The problem is that I changed the bean:write tags above to scripting variables (like <%=att1id%> but the tag handler is still getting the string "<%=att1id%>" instead of the content of the string attribute (like the parser is not parsing).

Can anybody help me?

Thanks in advance,

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you want your custom tag to accept a scriptlet as one of it's attributes, you must include:


with the definition of that attribute in your .tld file.

Consultant, Sima Solutions
Kaiser Lautern

Joined: May 11, 2005
Posts: 18
Thanks Merril,

That's exactly what was missing in my tld to make it work.

wood burning stoves
subject: tags as other tags' attribute value
Similar Threads
bean:define with bean:write
Using bean:define
Struts bean:message usage
construct struts tags dynamically