private ActionForward switchCurrentGroup(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
String name = req.getParameter("name");
GroupManager groupMgr = new GroupManager(locale, session);
Group group = groupMgr.getGroup(name);
if (group == null) {
throw new ConfigurationException("Switching groups failed: No group named `"+name+"` found.");
}
setCurrentGroup(req, resp, group);
LOGGER.debug("Switched to group `"+name+"`");
// create a JSON result: [result:...]
String jsonString = "[result:\"ok\"]";