public String getGroupDetails() {
   GroupDAO grp = new GroupDAOImpl();
   System.out.println("group_id     " + group_id);
   setGroupDetail(null);
   HttpSession session = ServletActionContext.getRequest().getSession(false);
   User u = (User) session.getAttribute("user");
   if (!(group_id == null)) {
     setGroupDetail(grp.getGroupDetails(group_id, Integer.parseInt(u.getUserId())));
     System.out.println("group id" + groupDetail.getGroup_id());
     System.out.println("group name" + groupDetail.getGroup_name());
   }
   NewsFeedAction n = new NewsFeedAction();
   setGrpList(grp.getAllGroups(Integer.parseInt(u.getUserId())));
   setFeedList(n.getGroupNewsFeed(group_id));
   int i = 0;
   while (i < grpList.size()) {
     System.out.println(grpList.get(i).getGroup_id());
     i++;
   }
   i = 0;
   System.out.println("post..................");
   while (i < feedList.size()) {
     System.out.println(feedList.get(i).getPostId());
     i++;
   }
   HttpServletRequest request = ServletActionContext.getRequest();
   request.setAttribute("groupDetail", groupDetail);
   request.setAttribute("grpList", grpList);
   request.setAttribute("groupDetail", groupDetail);
   return "success";
 }
 public String execute() throws NamingException, SQLException {
   HttpSession session = ServletActionContext.getRequest().getSession(false);
   User u = (User) session.getAttribute("user");
   GroupDAO grp = new GroupDAOImpl();
   System.out.println("icon " + icon);
   setGroup_id(
       String.valueOf(
           grp.insertGroupDetails(Integer.parseInt(u.getUserId()), grpName, grpMembers, icon)));
   GroupDAO grp1 = new GroupDAOImpl();
   setGrpList(grp1.getAllGroups(Integer.parseInt(u.getUserId())));
   System.out.println("after creation group id" + group_id);
   return "success";
 }
 public String getAllGroups() {
   System.out.println("groups");
   HttpSession session = ServletActionContext.getRequest().getSession(false);
   User u = (User) session.getAttribute("user");
   GroupDAO grp = new GroupDAOImpl();
   setGrpList(grp.getAllGroups(Integer.parseInt(u.getUserId())));
   int i = 0;
   while (i < grpList.size()) {
     System.out.println(grpList.get(i).getGroup_id());
     i++;
   }
   // HttpServletRequest request=ServletActionContext.getRequest();
   // request.setAttribute("grpList",grpList);
   return "success";
 }