码迷,mamicode.com
首页 > Web开发 > 详细

JSP include 指令

时间:2017-10-08 15:30:55      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:public   enc   set   www   encoding   tran   insert   port   body   

1. 创建test5.jsp test5_1.jsp test5_2.jsp

 test5_1.jsp

<%@ page import="java.util.*" %>
<%=(new java.util.Date()).toLocaleString() %>

 

test5_2.jsp

<div>hello world</div>

  

test5.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<p>test5</p>
<%@ include file="test5_2.jsp" %>

<%@ include file="test5_1.jsp" %>
</body>
</html>

  

 

JSP include 指令

标签:public   enc   set   www   encoding   tran   insert   port   body   

原文地址:http://www.cnblogs.com/linlf03/p/7637378.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!