newFwd.setPath(fwd.getPath()+"&id="+id);
return newFwd;
}
private Group getGroupParam(HttpServletRequest req) {
Group group = null;
String groupParam;
GroupManager groupMgr = new GroupManager(locale, session);
if (req.getParameter("group") != null) {
try {
groupParam = new String(req.getParameter("group").getBytes(), "UTF-8");
group = groupMgr.getGroup(groupParam);
if (group == null) {
group = webUser != null ? webUser.getGroup() : null;
}
} catch (UnsupportedEncodingException e) {
LOGGER.error(e);
}
} else {
groupParam = (String)req.getSession().getAttribute("restrictBlogsToGroup");
if (groupParam != null) {
group = groupMgr.getGroup(groupParam);
}
}
req.getSession().setAttribute("restrictBlogsToGroup", group != null ? group.getGroupname() : null);
return group;
}