This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp customtag as an attribute?" Watch "jsp customtag as an attribute?" New topic
Author

jsp customtag as an attribute?

Markus Meier
Greenhorn

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
    
    6
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 http://jakarta.apache.org/taglibs/doc/jsptl-doc/intro.html , or the summary that's available on the Wrox Press website at http://www.wrox.com/News/viewReview.asp?art_type=new&id=583 . It has its own "expression language" for accessing variables, etc.
Hope that helps...
Simon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp customtag as an attribute?
 
Similar Threads
JSP Tag that contains result of another
Doubts
Doubts in JSTL
How can we set a Collection object as attribute to be used by a custom tag?
Regarding Custom Tag