当前位置:网站首页>JSP中include指令的功能简介说明
JSP中include指令的功能简介说明
2022-08-02 11:09:00 【qq_25073223】
转自:
下文讲述JSP中include指令的功能简介说明,如下所示:
JSP中include指令的功能说明: 用于将不同的文件插入到当前JSP页面的指定位置
JSP指令的语法:
<%@include file="相对路径"%>
相关说明:
include指令:
用于通知JSP引擎在解析当前JSP页面时将其他文件中的内容合并进当前JSP页面转换成的Servlet源文件中
注意此种方式是:源文件级别进行引入的方式称之为静态引入
file属性:用于指定被引入文件的相对路径
例
a.jsp:
<%@page contentType="text/html;charset=gb2312"%>
<h2 style="font-family:arial;color:red;font-size:25px;text-align:center">
静态包含的标题(JSP)
</h2>
B.jsp:
<%@page language="java" contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>静态包含</title>
</head>
<body style="background-color:lightblue">
<%@include file="a.jsp"%><!--静态包含-->
<hr />
我来自B.jsp
</body>
</html> 边栏推荐
- 通过方法引用获取方法名
- The exchange - string dp
- LeetCode每日一练 —— 20. 有效的括号
- Getting Started with Three.JS Programmatic Modeling
- ansible模块--copy模块
- Multithreading (Basic) - 40,000 word summary
- Jay Chou's new song is released, crawl the "Mojito" MV barrage, and see what the fans have to say!
- ECCV22|PromptDet:无需手动标注,迈向开放词汇的目标检测
- Camera Hal OEM模块 ---- cmr_snapshot.c
- 21天学习挑战赛--第一天打卡(屏幕密度)
猜你喜欢
随机推荐
QT笔记——在一个窗口上显示另外一个透明窗口
LayaBox---TypeScript---命名空间和模块
FinClip | 来了, 2022 年 7 月更新大盘点
Mysql transaction isolation level and MVCC (multi-version concurrency control)
LayaBox---TypeScript---Advanced Type
MapStruct
X86函数调用模型分析
Several reasons why applet plugins benefit developers
Question about #oracle#, how to solve it?
从幻核疑似裁撤看如何保证NFT的安全
How to choose a truly "easy-to-use, high-performance" remote control software
LayaBox---TypeScript---迭代器和生成器
LayaBox---TypeScript---Iterator and generator
软件测试岗位巨坑?阿里在职7年测试人告诉你千万别上当
有奖征集|TaoCloud&宝德联合举办全闪POC!
WPF 截图控件之文字(七)「仿微信」
[Science of Terminology] For those difficult words about the integrated workbench, read this article to understand in seconds!
yolo格式(txt)数据集转VOC(xml)
Alibaba CTO Cheng Li: Alibaba Open Source History, Concept and Practice
The sitcom "Re-Walking the Long March" was staged









