Include Directive and Include Action

Prev Tutorial Next Tutorial

Difference between Include Directive and Include Action

Include DirectiveInclude Action
1In Include directive, the code of one jsp page is inserted into another jsp. It is called as compile time or static including.Include Action, the response of one page will be inserted into another page. It is called as run-time or dynamic including.
2In Include directive, for both source and destination pages, only a single Servlet will be generated internally so number of Servlet object are reduced.In Include action, individually Servlet are generated for each jsp page. So it increases the number of servlet object.
3In Include directive, the destination must be jsp page only.In Include action, the destination resource can be a jsp or Servlet or html.
4In jsp include directive, we have both html and xml syntax for the tag.In include action, we have only xml syntax but there is one html syntax.
5<%@include file=" "%><%JSP:include page=" "%>
6In include directive, the file must be available in the within some application.In include action the page may exits either within same application or another web application of server.

Prev Tutorial Next Tutorial

Download Projects

Google Adsense Advertisements
Free Classified Site – Bedpage

Yahoo Advertisements