Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

can a tag file call another one?  RSS feed

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a tag file (.tag) that I'd like to call another one. Is that allowed? I'm thinking it might not be because the tag isn't expanded in the HTML source.

When called from a tag file, it shows as:
<tags:xxxx/>

When called from a jspf (or jsp), the same tag expands.
 
Albareto McKenzie
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can, why not? call as much tags as you want, no problem with that
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66199
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you declaring the tag library in the tag file? It won't pick it up from the parent page (or from a prelude, for that matter).
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Are you declaring the tag library in the tag file? It won't pick it up from the parent page (or from a prelude, for that matter).

Yes. The really simplified example:

In my JSP, it outputs what the tag file writes out. Working as expected


In my JSP, this does properly call "theTagFileIWantToCallAnother" in that I get output from there.


In "theTagFileIWantToCallAnother", this outputs literally "<tags:xxxx />". Not what I expect to happen.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sigh. It was something obvious. I forgot to clear the JSP cache when editing the taglib earlier. (I had originally not declared the tag lib in the tag file. I did at least think of it before posting. And I did remember to restart the app.)

All better. Thanks Bear - that was the original problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!