Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between static and dynamic include  RSS feed

 
Deepa Jeeva
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please let me know the exact difference between static include and dynamic include(jsp:include) and also how many class files are generated when a file is statically and dynamically included ?
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Static : can not accept parameters
dynamic : can accept parameters.

Static include are faster than dynamic includes

Static include can not have dynamic file name because the container needs the file on translation phase, where as in dynamic container need file at run time.

in static include the content of the file will be included at translation phase. like copy and paste, in dynamic include the response of the included file be included to the original response at run time.

The syntax for static include is <%@ include file=�file.jsp� %> and the syntax for dynamic include is <jsp:include page=�file.jsp� />
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!