Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exact difference between include action and include directive

 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the diff b/w include action and include directive.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandra, please search through this very forum for those terms. This question has been asked and answered many times.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include action performs include or forward at runtime. Since it is a dynamic include, the include or forward page does not necessary be *compliable* at the compliation time, together with the page that include or forward that page. Of course, the pages MUST BE *compliable* individually.
Include directive performs include at the compliation time. Since the include is a static include, the original page contains the included page, and thus, both of them must be compliable at the compliation time.
Hope this help.
Nick.
[ March 04, 2004: Message edited by: Nicholas Cheung ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the include or forward page does not necessary be *compliable* at the compliation time

Huh?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
The statement should be read as:
the include or forward page does not necessary be *compliable* at the compliation time, together with the page that include or forward that page.
And then, Of course, the pages MUST BE *compliable* individually
Nick.
 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks nicholas what is compliable
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I mean is, the page can be complied.
For static inclusion, because the target JSP will be INCLUDED (i.e. the page content will be inserted into the source page), thus, the whole body, source page + target page, MUST be a single unit, and can be complied.
The case is obvious. Consider:

For static inclusion, the page A.jsp cannot be complied, because both pages contain the variable s, which is duplicated.
However, for dynamic inclusion, the above example works, because the target page is NOT included at the compliation time, as A.jsp and B.jsp are complied separately.
Does this make the case clear?
Nick.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic