Include Directive and Include Action
Advertisements
Difference between Include Directive and Include Action
Include Directive | Include Action | |
---|---|---|
1 | In 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. |
2 | In 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. |
3 | In Include directive, the destination must be jsp page only. | In Include action, the destination resource can be a jsp or Servlet or html. |
4 | In 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=" "%> |
6 | In 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. |
Google Advertisment