1.include.jsp
<%@ page contentType="text/html;charset=GB2312" language="java" %>
<html>
<head>
<title>include指令标记实例</title>
<style type="text/css">
p{color:deepskyblue; text-align: left; size:5px;}
</style>
</head>
<body>
<%@include file="head.jsp"%>
<p> 以下是本页面内容"。</p>
<p> include指令用于引入其他JSP页面,这里引入了"head.jsp"。</p>
</body>
</html>
head.jsp
<%@ page contentType="text/html;charset=GB2312" language="java" %>
<html>
<head>
<title>被引入的头文件</title>
<style type="text/css">
h1{color:red; text-align:center; size: 7px; }
</style>
</head>
<body>
<h1>这部分是Head.jsp的内容</h1>
</body>
</html>
运行结果: