当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
jsp动作指令
发布时间:2010/9/14 10:36:11 来源:城市学习网 编辑:ziteng
  jsp:include
  jsp:include要编译多个个文件,如果用include指令可能会出错, 因为要合成一个文件,为静态编译,比如如果charset不同就出错
  index.jsp,
  Java代码
  <%@ page contentType ="text/html;charset=gb2312" %>
  <!--  -->
  <!--  jsp:include page = "top.jsp" /-->
  <%@ include file = "top.jsp" %>
  <html>
  <head>
  </head>
  <body>&nbsp;
  This is my JSP page. <br>
  </body>
  </html>
  top.jsp
  Java代码
  <%@ page contentType ="text/html;charset=gb2312" %>
  <html>
  <head>
  </head>
  <body>
  This is top JSP page. <br>
  </body>
  </html>
  用include动作指令效果相同
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved