include Directive vs. jsp:include Action


What is the difference between include directive & jsp:include action?



Difference between include directive and jsp:include action:

  • provides the benifits of automatic recompliation,smaller class size ,since the code corresponding to the included page is not present in the servlet for every included jsp page and option of specifying the additional request parameter.
  • The also supports the use of request time attributes valus for dynamically specifying included page which directive does not.
  • the include directive can only incorporate contents from a static document.
  • can be used to include dynamically generated output eg. from servlets.
  • include directive offers the option of sharing local variables,better run time efficiency.
  • Because the include directive is processed during translation and compilation,it does not impose any restrictions on output buffering.

2007-04-03, 6641👍, 0💬