读书人

在SERVERLET中怎么把另一个页面文件IN

发布时间: 2012-01-31 21:28:41 作者: rapoo

在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吧。。。我也想知道

读书人网 >Java Web开发

热点推荐