当前位置: 代码迷 >> Java Web开发 >> 在SERVERLET中怎么把另一个页面文件INCLUDE在当前页面中
  详细解决方案

在SERVERLET中怎么把另一个页面文件INCLUDE在当前页面中

热度:11   发布时间:2016-04-17 13:02:38.0
在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吧。。。我也想知道
  相关解决方案