aspose file tools*
The moose likes JSP and the fly likes exact difference between include action and include directive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "exact difference between include action and include directive" Watch "exact difference between include action and include directive" New topic
Author

exact difference between include action and include directive

Chandra Bairi
Ranch Hand

Joined: Sep 12, 2003
Posts: 152
what is the diff b/w include action and include directive.


Thanks,
Shekar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61198
    
  66

Chandra, please search through this very forum for those terms. This question has been asked and answered many times.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
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 ]

SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61198
    
  66

the include or forward page does not necessary be *compliable* at the compliation time

Huh?
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
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

Joined: Sep 12, 2003
Posts: 152
Thanks nicholas what is compliable
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exact difference between include action and include directive