使用文件包含指令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>&nbsp;</td>
  </tr>
</table>
<%@ include file="copyright.jsp"%>
</body>
</html>

copyright.jsp

<%@ page pageEncoding="GB18030"%>
<%
String copyright="&nbsp;All Copyright &copy; 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">

 

posted @ 2013-04-24 21:35  glt66  阅读(232)  评论(0编辑  收藏  举报