WebSphere Commerce common interview Questions.
1) Difference between static and dynamic include?
Ans: The syntax for
static include is <%@ include file=”filename.jsp”
%>
dynamic include is <jsp:include
page=”filename.jsp” />
Static include is an inline inclusion (the contents of the file
will be included at translation phase) like a copy and
paste. During the translation or compilation phase all the included JSP pages are compiled into a single Servlet.
Use “static includes” when a JSP page does not change very often.
In case of dynamic include the response of the file will be included
to the original response at runtime. The file will be processed
separately and only the response will become the part of the original
files’ response. The dynamically included JSP is compiled into a separate Servlet. It is a
separate resource, which gets to process the request, and the content
generated by this resource is included in the JSP response.
Static include cannot accept a parameter . But dynamic include can accept a parameter.