码迷,mamicode.com
首页 > 其他好文 > 详细

页面时间的展示

时间:2016-07-23 22:48:01      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

import java.text.SimpleDateFormat;
import java.util.Date;


Person person = new Person();
        person.setName("james");
        person.setAge(28);
        person.setAddress("maami");
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        Date date = format.parse("1985-04-22");
        person.setBirthday(date);
        map.put("p", person);
        return "index";

<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>


  <h1>${p.name }</h1>
    <h1>${p.age }</h1>
    <h1>${p.address }</h1>
    <h1><fmt:formatDate value="${p.birthday }" pattern="yyyy-MM-dd"/> </h1>

 

页面时间的展示

标签:

原文地址:http://www.cnblogs.com/52hadoop/p/5699550.html

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