• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Some way to include() from inside a TagSupport instance?

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm struggling to see a way to do the equivalent of:

<jsp:include .. />

By writing my own Tag for it (because the actual path will be unknown to the template).

If I do a simple (in a class extending TagSupport):



Then what happens is that the included JSP is output *before* the rest of the template rather than being nested at the point where the tag is invoked.

If there's something better suited to this than just JSP and tag libraries let me know because I could do with learning about these other terms I'm hearing tossed around (there's too many :P jsp, jsf, jstx, jspx..).
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to use include without issue. Perhaps this article might help?
 
Chris Corbyn
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
*chuckles* I completely missed PageContext.include() and was using RequestDispatcher.include(). Thinking about it logically, it makes perfect sense why I got the template being output too early

[ September 02, 2007: Message edited by: Chris Corbyn ]
[ September 02, 2007: Message edited by: Chris Corbyn ]
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic