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

解决方案 »

  1.   

    用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>
    我在另外的帖子也有回答
      

  2.   

    虽然jsp也是一种servlet。但是好像楼主问的是servlet吧我也想知道