jsp:include page=.. and include file = ...

Ads

 
 

Share on Google+Share on Google+

Vijay Kumar
jsp:include page=.. and include file = ...
1 Answer(s)      6 years and 10 months ago
Posted in : JSP-Interview Questions

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

Ads
View Answers

October 29, 2010 at 4:34 PM


<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.


Ads









Related Tutorials/Questions & Answers:
jsp:include page=.. and include file = ...
jsp:include page=.. and include file = ...   What is the difference between <jsp:include page = ... > and <%@ include file = ... >?.   <jsp:include page = ... >: This is like a function call from
include a static file
include a static file  How will you include a static file in a JSP page?    You can include a static resource to a JSP using <jsp:directive > or <%@ inlcude >
Advertisements
JSP Include File
to include a html file in the jsp page. You can see in the given example that we... have include html file 'include File.html in the jsp page. The syntax... JSP Include File   
include a jsp file
include a jsp file   Sir, I have 2 jsp pages. I want to include second jsp in the first jsp page when a button in the first jsp is clicked. how can I do this. I tried in sevaral ways . I am using jsp and javascript... anyone
How to include a File using directive and include action
one attribute named as file, which is used to include a file in the jsp page.... The inclusion of the file is done at the translation time. <jsp:include page = "...How to include a File using directive and include action
Jsp include page problem
Jsp include page problem  I have included footer.jsp in all my pages. It is working in all pages except search.jsp. In search.jsp (Old footer.jsp content is displayed ) How can I rectify this?   Hi, You have to delete
Include directive vs Include Action
;) includes file into the JSP page at compile time. Include directive should be used if the included code is in the same page. Include Action: Includes action (<.... If you wish to insert a standard header and footer in your page, include action
Creating dynamic jsp file in java file to include another jsp file
Creating dynamic jsp file in java file to include another jsp file  I........ Need to include jsp file in the same content. The below code doesn't help me " jsp:include page="pageValue" " Please help. Thanks In Adv.  
The Include Directive in JSP Page
; <%@include file="relativeURL" %> <jsp:include page="... to include the specified file either static or dynamic resource in a JSP page. Contents of the include file is added to the calling JSP page if the resource
Include template file in another template file
Include template file in another template file       This Example shows you how to include another... file #include("./src/include.vm") include1.vm Now, you
Include Static HTML Page in JSP
Include Static HTML Page in JSP   ... html page in jsp. In JSP, there are two ways to include another web resource. 1... to be reused. In this example <%@ include file="static.html" %>
how can i export a .jar file include .mbd file?
how can i export a .jar file include .mbd file?  i have a project of java.it includes a .mdb file, when i export to .jar file i eclipse, it show a error that can't export .jar file width the .mdb file ? how can i import this .mdb
Java to create table in jsp file that include other jsp file
Java to create table in jsp file that include other jsp file  String jspContent = "table" += "tr" += "td" += "jsp:include page='fileSource'" //this line is not working properly... += "/td" += "/tr>" += "/table" Please refer
Include static files within a JSP page
for the file attribute. Although you can also include static resources using...Include static files within a JSP page  How do I include static files within a JSP page?   Static resources should always be included
how to include an html page inside a tab
how to include an html page inside a tab  how to include an static html page inside a tab(in jquery)   Please visit the following links...;actually i want to knw how to include an google page inside a tab(suppose in 2nd
How To Include Two Jsp page in another jsp page?
How To Include Two Jsp page in another jsp page?  I use following code to Include Two Jsp Page Header and footer <%@include file="header.jsp" %> <%@include file="footer.jsp" %> But it can not display proper position
include a delete option in every row of table in a JSP page
include a delete option in every row of table in a JSP page  I have the following code of a JSP page........... <blockquote> <p>... the change on the page..............also if the user clicks on edit then he can
JSP Include jsp
include either a static or dynamic file in a JSP file. If the file is static, its text or content is included in the calling JSP page. If the file is dynamic...;Includes Jsp Page</h2> <jsp:include page="includedJsp.jsp" >
jsp:include action tag
the resource at the request time. It is better for dynamic web page. The include tag,  which inserts the file at the time when jsp page is translated... or html page in the current jsp. Syntax: <jsp:include page = relative URL"
Passing Parameter with <jsp: include>
; action tag. This action tag has one attribute page which is used to include a file in a jsp page. While using <jsp:param> we are adding...--> <jsp:include page="AccessincludedParameter.jsp"> <jsp
How to include Two multi rows, one with a file Upload and another with normal fields, have problem while including both
How to include Two multi rows, one with a file Upload and another with normal fields, have problem while including both  How to include Two multi rows, one with a file Upload and another with normal fields, have problem while
Uploaded File View Page
Uploaded File View Page  hello, How to view the uploaded file with out downloading it into the machine by using JSP. Sharath
php Include
command provides the opportunity to include several php pages within a single page. This feature facilitates us to save our time. Include takes a file name... want to put a menu or similar thing in every web-page then you can use Include
How to include?
How to include?  How can we include a JSP file in one application to the JSP file in another application which are in the same server?? please help me out with code
Finding page count in any file
Finding page count in any file  Hi, I want to find out the page count in any file (doc,ppt,pdf,image,etc...). Is there any universal API to deal with any file irrespective of the file extension.Its bit urgent. Please let me
Facelet include Tag
Facelet include Tag          This tag is used to include the content of a page. This page name is specified by src attribute of include tag. The page
attach file in my web page
attach file in my web page  hide button in input typ=file button in jsp
require() and include()
() statement includes and evaluates the specified file. include() produces...require() and include()   hii, What is the difference between require() and include() in php?   hello, The require() statement includes
JSP include
; A JSP page can include page fragments from other files to form the complete...; For example the directive:  <%@ include file="filename.jsp" %>... and the included file are simply merged.  include action The include
php include
php include  i'm trying to include a header on my page but it doesn't display anything here's my code
include tag
include tag  good morning sir. This is venu sir.i am pursing mca . I am learning struts2 but i have a small doubt i am using include tag. ex welcome to rose India.net but only display on mybirthday.jsp page in the above