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
What is jsp api?
what is the extended star schema
What are the implicit objects in jsp?
how can i update the marque in jsp without changing the sourse code
What are the elements of a jsp page?
Explain the action.
Explain the
Mention the scope values for
Which two interfaces does the javax servlet jsp package have?
How do you prevent the creation of a session in a jsp page and why? What is the difference between include directive & jsp:include action?
What are jsp action tags?
What is the purpose of jsp?
How to call java method in jsp page on button click?
How many jsp scripting elements are there and what are they?
Why jsp is used instead of html?