Difference between include Directive and include Action in jsp

Difference between include Directive and include action :

The include Directive and include Action both are used to include content into a jsp page. But some differences between them are as follows :

  • The include directive tag include the content in the generated servlet page during the translation phase of jsp life cycle. It used to include file such as html, xml, jsp or .txt file into a jsp page statically. While include action tag include the response generated by executing the given jsp or servlet page during request processing phase.
  • The include directive tag does not allow us to use the expression for giving the url path, to including the resource in jsp page. While include action tag accepts expression.
Advertisements