my dog learned polymorphism*
The moose likes JSP and the fly likes Using custom tag from the other custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using custom tag from the other custom tag" Watch "Using custom tag from the other custom tag" New topic
Author

Using custom tag from the other custom tag

Vladas Razas
Ranch Hand

Joined: Dec 02, 2003
Posts: 385
Hi,
I want to wrap existing custom tag with another custom tag. Like this:
<originalTag />
Output original

<extendedTag />
Output original
Some other output from extended tag
But! I dont want to do:
<extendedTag>
<originalTag />
</extendedTag>
Thank you
brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
Take a look at your syntax ...
You say

By writing the original as <originalTag/> you CANNOT specify any body for the tag and that tag effectly ends there because you end it with />.
The only way to embed one tag in another would be:
<originalTag>
<extendedTag/>
</originalTag>
 
 
subject: Using custom tag from the other custom tag