rissqjwyk
rissqjwyk
2010-04-26 14:36

hibernate一对多jsp里显示

  • hibernate

bean:
public class User{
private Integer uid;
private String username;
private Set userfriend=new HashSet();
……
}
public class Friend{
private Integer fid;
private String friendname;
private Integer uid;
……
}
action:
Map session = (Map) ActionContext.getContext().getSession();
User userInfo = (User) session.get("user");//user里面有数值
jsp:
/s:iterator





单向一对多关系,struts2标签,jsp的写法是错误的,以前写过,今天想了半天都没想起来怎么写

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答