使用文件包含指令include
index.jsp
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>使用文件包含include指令</title>
</head>
<body style="margin:0px;">
<%@ include file="top.jsp"%>
<table width="781" height="279" border="0" cellpadding="0" cellspacing="0" background="images/center.JPG">
<tr>
<td> </td>
</tr>
</table>
<%@ include file="copyright.jsp"%>
</body>
</html>
copyright.jsp
<%@ page pageEncoding="GB18030"%>
<%
String copyright=" All Copyright © 2009 吉林省明日科技有限公司";
%>
<table width="778" height="61" border="0" cellpadding="0" cellspacing="0" background="images/copyright.JPG">
<tr>
<td> <%= copyright %></td>
</tr>
</table>
top.jsp
<%@ page pageEncoding="GB18030"%>
<img src="images/banner.JPG">