Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

which situation you use static include and dynamic include
in jsp?

Answer Posted / sreekanth madamanchi

This is Static include.
<%@ include file="header.jsp" %>
1.the file includes static text. i.e if we use the static
include, it will merge the contents of included jsp
(header.jsp) with main jsp at compile time. and the size of
the main jsp will increase. some times it may have problem,
because the maximum size of the jsp is 64kb.
2.if the file is changed,the JSP engine may not recompile
the JSP

This is Dynamic include.
<jsp:include page="header.jsp">
1.The file includes Dynamically. i.e at run time.
2.If the included file (header.jsp) is changed,the JSP
engine recompile the included JSP, because it will include
at run time.By using this the jsp size also not increased.
For Example
Static include (<%@ include file="header.jsp" %>) like our
#include (C++)
Dynamic include (<jsp:include page="header.jsp"> ) like our
import (JAVA)

Is This Answer Correct ?    46 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is jsp technology extensible?

1036


Differentiate between jsp scriptlet tag and declaration tag.

988


How do I run a jsp file in linux?

931


How do I include static files within a jsp page?

898


What are jsp action tags?

799


Give a sample jsp configuration in the deployment descriptor.

876


Can a jsp page process html form data?

932


Explain the action.

854


Why do we use jstl tags?

820


Why are jsp pages the preferred api for creating a web-based client program?

990


What is iselignored in jsp?

919


What are advantages of jsp over asp, php, pure servlets and others?

861


Why is jstl used?

852


What is the difference between a scrollbar and a scrollpane in jsp?

835


How do I run a jsp file?

897