Difference between JSP include directive and JSP include action
2014-10-20 14:14
399 查看
http://javapapers.com/jsp/difference-between-jsp-include-directive-and-jsp-include-action/
<%@ 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.
<%@ 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.
相关文章推荐
- ruby learning-- Difference between require and include
- Difference between JSP forward and redirect.
- jsp:include and include directive
- Difference between forward and include of RequestDispatcher
- Difference between component and directive in Angular 2
- what is differences between action and actionlistener in JSF components?
- differences between Require, Load, Include and Extend methods
- Difference between menu item types; Display, Output and Action in Dynamics Ax
- Difference between Action and Function
- Include directive and Include action
- What is the difference between JSP and servlets?
- Learn the difference between SCSI and IDE
- Difference Between XML and XAML
- Difference between Windows and Linux
- The difference between data references and field symbols
- Difference between executor.submit and executor.execute
- /doreg.jsp (line: 11, column: 0) Expecting "jsp:param" standard action with "name" and "value" attributes 错误解决办法
- Difference between new (delete) and malloc (free)
- Difference Between Arraylist And Vector : Core Java Interview Collection Question
- Part 59 to 60 Difference between Convert ToString and ToString,String and StringBuilder