<%@ include file=?filename? %> is the JSP include directive. At JSP page translation time, the content of the file given in the include directive is ?pasted? as it is, in the place where the JSP include directive is used. Then the source JSP page is converted into a java servlet class. The included file can be a static resource or a JSP page. Generally JSP include directive is used to include header banners and footers. The JSP compilation procedure is that, the source JSP page gets compiled only if that page has changed. If there is a change in the included JSP file, the source JSP file will not be compiled and therefore the modification will not get reflected in the output. <jsp:include page=?relativeURL? /> is the JSP include action element. The jsp:include action element is like a function call. At runtime, the included file will be ?executed? and the result content will be included with the soure JSP page. When the included JSP page is called, both the request and response objects are passed as parameters. If there is a need to pass additional parameters, then jsp:param element can be used. If the resource is static, its content is inserted into the calling JSP file, since there is no processing needed. | 0 |
By: [email protected] On: Mon Dec 30 10:43:06 IST 2013 0 359 0 | 359 |
Are You Satisfied :3Yes0No |
include directive inserts the source at translation time but the action tag inserts the response at runtime. and there is an extra performance hit with every action tag. | 0 |
By: [email protected] On: Mon Dec 30 18:21:32 IST 2013 0 392 0 | 392 |
Are You Satisfied :0Yes0No |
you are right sir,but in my example given above if i make any changes in the included jsp page(here demo.jsp) then it reflects the changes which i have made in the included jsp page automatically while the changes in the included jsp page should not be reflected in the source jsp page but in this example source jsp page reflect the changes which i have made in the included jsp page.now my question is that why it reflects the changes of included jsp page in the source jsp page aumatically when i make any changes in included jsp page. | 0 |
By: [email protected] On: Tue Dec 31 01:07:34 IST 2013 -3 0 0 | -3 |
Are You Satisfied :0Yes0No |
jsp include example ================= <%@ page import="java.util.*"%> o/p of two.jsp <jsp:include page="three.jsp"/> two.jsp <%@ page import="java.util.*"%> o/p of three.jsp asdfdf newsldfk <%out.println(new Date());%> three.jsp include directive example ================= <%@ page import="java.util.*"%> o/p of two.jsp <%@include file="/three.jsp"%> <%out.println(new Date());%> two.jsp <%@ page import="java.util.*"%> o/p of three.jsp asdfdf newsldfk <%out.println(new Date());%> three.jsp in above two cases both are giving same out put .could u pls explain with example | 0 |
By: [email protected] On: Fri Aug 14 08:18:51 IST 2015 0 0 0 | 0 |
Are You Satisfied :0Yes0No |