• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference in include and jsp:include

 
Pawanpreet Singh
Ranch Hand
Posts: 264
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is actual difference in "include" directive and standard action <jsp:include.

Could anybody please explain it in detail.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main thing to remember is that the include action allows both static and dynamic content to be included, whereas the include directive only allows static content.
An include directive regards a resource like a JSP page as a static object; i.e. the text in the JSP page is included. An include action regards a resource like a JSP page as a dynamic object; i.e. the request is sent to that object and the result of processing it is included.

You could read "JSP.1.10.5 Including Data in JSP Pages" in the specification for more details.
 
Pawanpreet Singh
Ranch Hand
Posts: 264
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou.
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For include directive, resource is included at transalation time whereas for <jsp:include> the response of resource is included at run time
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic