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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / anilkumar_iq

when same request and response objects are shared by
multiple JSP's in dynamic include

In static include internally,it will merge the contents(eg:
one.jsp and two.jsp) and creates a jsp as(one_two.jsp)then
generates the output of both the jsp's

Is This Answer Correct ?    15 Yes 4 No

Post New Answer

More JSP Interview Questions

What is jsp in html?

0 Answers  


Which package does a jsp api consist of?

0 Answers  


How are cookies set in jsp?

0 Answers  


What is jsp taglib?

0 Answers  


What are jsp elements?

0 Answers  


Can you make use of a servletoutputstream object from within a jsp page?

0 Answers  


Is jsp static or dynamic?

0 Answers  


What are the components that make up a tag library in jsp?

0 Answers  


How can I prevent the use of scripts and java code on the jsp page?

0 Answers  


Is jsp better than servlet?

0 Answers  


What is the use of?

0 Answers  


Explain the jspdestroy() method?

0 Answers  


Categories