• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:include vs c:import

 
Charles Hasegawa
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please explain why/when you should use either <jsp:include> or <c:import> for including a page fragment.
[ October 02, 2003: Message edited by: Charles Hasegawa ]
 
Sue Spielman
Author
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Charles:
<c:import> provides more felxibility to the page author by allowing content to be specified from other web applications (or contexts) or even other web servers. You can't do that with <jsp:include> or <% include %>. You can also have content in a scipe variable as either a String or a java.io.Reader object when using <c:import>. There's also some performance improvements regarding buffering when using <c:import>.
HTH.
Sue
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Charles Hasegawa:
Can anyone please explain why/when you should use either <jsp:include> or <c:import> for including a page fragment.
[ October 02, 2003: Message edited by: Charles Hasegawa ]

Charles, u might want to view the following thread in Experts-Exchange.com
http://www-tcsn.experts-exchange.com/Web/Web_Languages/JSP/Q_20696693.html
That's also a good discussion...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!