Meaningless Drivel is fun!
The moose likes Servlets and the fly likes jsp customtag as an attribute? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp customtag as an attribute?" Watch "jsp customtag as an attribute?" New topic

jsp customtag as an attribute?

Markus Meier

Joined: Aug 10, 2001
Posts: 2
Hi Folks
Does anybody know, if I can use a CustomTag as a value of an attribute for an other CustomTag?
something like this?
<ejob:CheckboxTag translator="CarTranslator" field="<ejob:CheckboxTag column='DRIVING_LICENCE' />" />
...may the source be with you

-----<BR>...may the source be with you
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
Attributes can be a primitive type or any Java object, and they can be set statically (i.e. hard-coded in the JSP) or dynamically at request-time using JSP expressions. At the moment, using tags as attributes isn't possible.
What you can so though is make your tags co-operate in other ways. For example, you could nest your tags, or make them share information (implicitly or explicitly) through scripting variables on the page, or even the HTTP session.
Alternatively, take a look at some of the Standard TagLib stuff going on over at , or the summary that's available on the Wrox Press website at . It has its own "expression language" for accessing variables, etc.
Hope that helps...
jQuery in Action, 3rd edition
subject: jsp customtag as an attribute?
It's not a secret anymore!