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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is port number in java?

585


What is a method signature java?

565


Can we overload run() method in java?

592


Why super is first line in java?

552


Why enumeration is faster than iterator?

527






Explain about the main() method in java?

565


What does it mean to flush a file?

564


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

1795


5 Coding best practices you learned in java?

634


Can we override a variable in java?

543


Can you give few examples of final classes defined in java api?

559


Explain thread in java?

658


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

1725


What the difference is between execute, execute Query, execute Update?

370


Why stringbuffer is faster than string?

532