wood burning stoves 2.0*
The moose likes JSP and the fly likes Can you have jsp tags inbedded in each other Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Can you have jsp tags inbedded in each other" Watch "Can you have jsp tags inbedded in each other" New topic
Author

Can you have jsp tags inbedded in each other

Jag Bains
Ranch Hand

Joined: Nov 19, 2002
Posts: 39
Hi,
I was wondering if there was a way of imbedding jsp tags one inside other so that the output for tag1 is used as one of the parameters for tag 2?
Jag
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

you mean a custom taglib? yup -- that's called a nested tag. It can look like this:

Check out the J2EE Tutorial on Sun's site -- particularly the section about Cooperating Tags
[ March 29, 2003: Message edited by: Jessica Sant ]

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Or... were you thinking of a construct like:

If so, and if you think of how custom tags work -- the fact that they do not "return" a value, but rather emit text to the JSP output stream -- this doesn't really make much sense.
And even if it did, would you really want to get into such a syntactic mess?
What is it you are actually trying to achieve? Would the nested tag construct (very, very useful and powerful) work for you?
hth,
bear
[ March 29, 2003: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can you have jsp tags inbedded in each other
 
Similar Threads
Equivalent XML tags?
SCWCD - components and resources
JSP Variables
How to implement tabs and workspaces within tabs.
standard tags in JSP