What is the difference between jsp:include page and @ include file?
By: KarthikQuestion: What is the difference between
<jsp:include page = ... >and
<%@ include file = ... >?.
Answer: Both the tag includes the information from one page in another. The differences are as follows:
<jsp:include page = ... >:
This is like a function call from one jsp to another jsp. It is executed ( the included page is executed and the generated html content is included in the content of calling jsp) each time the client page is accessed by the client. This approach is useful to for modularizing the web application. If the included file changed then the new content will be included in the output.
<%@ include file = ... >
: In this case the content of the included file is textually embedded in the page that have <%@ include file=".."> directive. In this case in the included file changes, the changed content will not included in the output. This approach is used when the code from one jsp file required to include in multiple jsp files.
View Tutorial By: Brettkip at 2017-07-20 11:38:40
Comment on this tutorial
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews
What do you understand by JTA and JTS?
What do you understand by Synchronization?
Name the containers which uses Border Layout as their default layout?
What is bean managed transaction?
What are the call back methods in Session bean?
Can Entity Beans have no create() methods?
What is the difference between JTS and JTA?
What is difference between Java Bean and Enterprise Java Bean?
What is J2EE Connector architecture?
Tell me something about J2EE component?
Differentiate between .ear, .jar and .war files.