• Post Reply Bookmark Topic Watch Topic
  • New Topic

Advantage of using <jsp:include> over <%@include>  RSS feed

 
nancy andrew
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I understand the differnce between <jsp:include> and <%@include>. In @include, the same servlet is created for the included jsp while in jsp:include two different servlet are presend in memory. @include is used to access static contents, while jsp:include is used when content changes dynamically. But i dont really understand what is the advantage to user if the same servlet is created or two differnent servlet are created internally. Please help me to understand this.

Thanks,
Nancy
 
Vinoth Thirunavukarasu
Ranch Hand
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@include> is static include
and <jsp:include> is dynamic include..
When you use <jsp:include> the file will be included at runtime but when you use <%@include> file will be included at compile time
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check these links will help you

best practises

jsp whitepaper
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!