aspose file tools*
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
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: 61648
    
  67

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