2019独角兽企业重金招聘Python工程师标准>>>

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.

  • 所以用<jsp:include page="${actionjs}" />可以动态指定要包含的file,因为这个动作元素可以是在执行jsp文件生成的class可编译文件的时候才去找page属性相关的那个文件。

  • 而用<jsp:directive.include file="/js/erp/hr/genericReport/GenericReportAction.js" />只能写死包含的文件。

转载于:https://my.oschina.net/u/1583086/blog/405811

JSP include directive 和JSP include的区别相关推荐

  1. %@ INCLUDE FILE=%与JSP:INCLUDE PAGE=/区别

    2019独角兽企业重金招聘Python工程师标准>>> 两者最重要的区别:JSP指令<%@ include file=""%>,是将被引入的JSP与原 ...

  2. %@ include file=和jsp:include file=区别

    <%@include file="a.jsp"%>是在编译时加入,所谓静态,就是在编译的时候将jsp的代码加入进来再编译,之后运行. <jsp:include p ...

  3. include静态引入jsp与动态引入jsp的区别

    1.JSP中的include指令,它主要是用来在当前的页面中引入其他的页面.这种引入方式成为静态的入. <body> <%@include file="header.jsp ...

  4. JSP的7个动作include,forward,useBean。。。

    <jsp:include>//包含 <jsp:forward>//跳转 <jsp:useBean>//使用javabean <jsp:setProperty& ...

  5. 【Head First Servlets and JSP】笔记24:include指令与include动作 param动作 foward动作...

    include指令与include动作 1.样例代码 <%@ page contentType="text/html;charset=UTF-8" language=&quo ...

  6. JSP 活动元素 <jsp:directive.pageimport=“zero.space.ch03.Bookbean“/> 解读

    <jsp:directive.pageimport="zero.space.ch03.Bookbean"/> 是 JSP 的活动元素,其作用相当于 JSP 指令 < ...

  7. C语言中,#include的用法:#include 和 #include区别

    C语言中,#include的用法:#include "" 和 #include<>区别 采用 " ":依次搜索当前目录.包括/I编译开关的路 ...

  8. JSP的概念||原理||JSP的脚本||JSP的内置对象||response.getWriter()和out.write()的区别||案例:改造Cookie案例

    1. 概念 * Java Server Pages: java服务器端页面         * 可以理解为:一个特殊的页面,其中既可以指定定义html标签,又可以定义java代码         * ...

  9. jsp 中forward 和 Redirect 的用法区别

    jsp中跳转的用法和区别 区别 用法 forward的用法 redirect的用法 区别 首先我们要知道的是forward是转发,地址用的是原地址,但是内容变为设置转向地址的内容. redirect ...

最新文章

  1. iOS 柱状图的定制
  2. 香草 jboss 工具_使用Tensorflow创建香草神经网络
  3. html重置默认字体,html网页默认字体
  4. Fences报错,explorer.exe未正确关闭问题
  5. Mac idea破解到2100年
  6. ASP.NET 班级网站-程序+配置文档
  7. 解决pdf中翻译外文文献到word参考文献格式错误
  8. windows 远程桌面客户端
  9. 青龙面板最新版本2.10.11+(诺兰短信登录)nvjdc详细教程
  10. “辉夜姬”:多利之后的动物明星
  11. Excel如何利用时间差操作,求得员工的工龄
  12. 非常有意思的网页版在线PS
  13. unity 导出 ios 项目运行在模拟器
  14. 简易爬虫实现校园网剩余流量查询
  15. Oracle 19c VLDB and Partitioning Guide 第4章:分区管理 读书笔记
  16. python中幂函数_解决python中的幂函数、指数函数问题
  17. 钉钉群机器人开发接口
  18. Java实现 LeetCode 537 复数乘法(关于数学唯一的水题)
  19. 科学的固定资产管理让企业实现降本增效
  20. 衣柜html模板,22款衣柜设计,这样的衣柜简直好看到逆天!

热门文章

  1. 百度推出完全端到端的并行音频波形生成模型,比WaveNet快千倍 | 论文
  2. 史上最严重数据车祸:100+车厂机密全曝光,通用丰田特斯拉统统中招
  3. 暴雪准备用AI打击“游戏喷子”
  4. AI能为智能手机带来哪些惊喜?Gartner列了这十大应用
  5. 摩拜前端周刊第10期
  6. [转]微擎应用笔记3--manifest.xml文件使用说明
  7. aws平台中为ec2实例添加双网卡
  8. shell 命令进阶(三)
  9. POJ 1065 Wooden Sticks(LIS,最少链划分)
  10. java读取各类型的文件