• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can you have jsp tags inbedded in each other

 
Jag Bains
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic