• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Chris Corbyn
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • 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..).
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic