Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating a template jsp page

 
Maxim Katcharov
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a 'template' jsp, into which I'd like to insert the output of another jsp. However, this isn't as simple as



since I don't want to hard code the page that I'm including. I could of course do the following:



but I would much rather just add something like



to the template page. Unfortunatley, this isn't allowed. So I tried



as a hack. Unfortunatley, I don't seem to know what I'm doing anymore (if I ever did), since this either spits out directly after the last normal include action, or throws a "getOutputStream() has already been called for this response".

The real question here is, how do I make a template into which I can toss various types of content? (without creating two files, making the code illegible, or making it not work at all)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


or better yet, check out the <c:import> tag of the JSTL.
 
Maxim Katcharov
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, I didn't know that that could be done. And thanks for the tip, I'll look it up.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic