首页 > 其他 > 详细

页面时间的展示

时间:2016-07-23 22:45:01      阅读:228      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!