日期:2014-05-18  浏览次数:20654 次

在SERVERLET中如何把另一个页面文件INCLUDE在当前页面中?
在SERVERLET中如何把另一个页面文件INCLUDE在当前页面中?

------解决方案--------------------
用include就可以办到,一个jsp中 导入(连接)其他jsp

<%@ page contentType= "text/html; charset=GBK " %>
<html>
<head>
<title> includeExample </title>
</head>
<body bgcolor= "#ffffff ">
<table width= "100% ">
<tr>
<td height= "10 " align= "center ">
<!--注意!这里就是要导入的index.jsp-->
<%@include file= "index.jsp "%>
</td>
</tr>
<tr>
<td height= "500 " align= "center "> 这是你的 Main.jsp </td>
</tr>
</table>
</body>
</html>
我在另外的帖子也有回答
------解决方案--------------------
虽然jsp也是一种servlet。但是好像楼主问的是servlet吧。。。我也想知道