what is the difference between @include page and @include file

Answers were Sorted based on User's Feedback



what is the difference between @include page and @include file..

Answer / alim atar

<jsp:include page="page.jsp" >
is action which include the output of page.jsp at
dyanamically.Instead of copying all content of page.jsp
Container transalte ,compiles page.jsp separtly and copy
the ouput of page.jsp to current page.It means it's
dyanamic inclusion.
<@include file="page.jsp">
it is directory which copy all content's of page.jsp to
current jsp page and then complete current page is
translated and compiled. It is static inclusion of file
which means copy all source code to current page as it is.

Is This Answer Correct ?    24 Yes 2 No

what is the difference between @include page and @include file..

Answer / satyanarayana

<jsp:include page="page.jsp" >
is action which include the output of page.jsp at
dyanamically.Instead of copying all content of page.jsp
Container transalte ,compiles page.jsp separtly and copy
the ouput of page.jsp to current page.It means it's
dyanamic inclusion.

In translation it will create only two servlet.

After inclusion if there any changes in source file will
reflect in jsp

it is evaluated with every request.



<@include file="page.jsp">
it is directory which copy all content's of page.jsp to
current jsp page and then complete current page is
translated and compiled. It is static inclusion of file
which means copy all source code to current page as it is.

In translation it will create only one servlet.

After inclusion any change in source file will not reflect
the jsp.
it is evaluated only once at translation time.

Is This Answer Correct ?    7 Yes 2 No

Post New Answer

More Core Java Interview Questions

What are the wrapped, classes?

0 Answers  


what is java

10 Answers  


What are the access modifiers in java?

0 Answers  


Explain different forms of polymorphism?

0 Answers  


How are the elements of a gridbaglayout organized?

0 Answers  


When do we need to use internal iteration? When do we need to use external iteration?

0 Answers  


What is command line used for?

0 Answers  


What is user defined exception in Java?

0 Answers   TCS,


Tell me the difference between an applet and a Japplet?

1 Answers  


what is difference between front controller and action servlet?

2 Answers  


Is hashset ordered?

0 Answers  


In Java list the methods that can be overridden?

0 Answers   Accenture,


Categories