Bookmark Topic Watch Topic
  • New Topic

What is the difference between <jsp:include page = ... > and <%@ include file = ... >?.

 
Nagaraj Shivaklara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,

What is the difference between <jsp:include page = ... > and
<%@ include file
= ... >?
 
ragz shetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hey,

In Jsp we can include(Reuse) code in 2 types
1) <jsp:include page = : this means page will include at runtime. means only content is included not the code.
2) <%@ include file = ... > : Page will include and compile time. that means actual code is included.

-Ragz
 
Nagaraj Shivaklara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks a lot ragz ..

ragz shetty wrote:Hey,

In Jsp we can include(Reuse) code in 2 types
1) <jsp:include page = : this means page will include at runtime. means only content is included not the code.
2) <%@ include file = ... > : Page will include and compile time. that means actual code is included.

-Ragz
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Report post to moderator
ragz shetty wrote:2) <%@ include file = ... > : Page will include and compile time.

more specifically at Jsp translation time and using this static include, you cant pass param to the included page
 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

Please check this link. The question is already answered there
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!