jsp获取map

1、简单Map

 User user = new User();
    user.setName("zmy");
    user.setAge(11);
    user.setBirthday(new Date());
    request.setAttribute("user", user);

   Map map = new HashMap();
    map.put("sname","light");
    map.put("gender","male");
    map.put("user",user);
    request.setAttribute("map",map);
${map.sname}、${map.gender}、${map.user.name}

2、

猜你喜欢

转载自www.cnblogs.com/zouhong/p/11802280.html