@RequestMapping(value = "/follow.html", method = RequestMethod.POST, params = "bean=fuser")
public ModelAndView handleRequest(
@ModelAttribute("user") TwitterUser tuser,
HttpServletRequest request) throws Exception {
TwitterUser currUser = Authenticator.isValid(request);
ModelAndView mv = new ModelAndView();
if (currUser != null) {
Long objId = tuser.getObjId();
TwitterUser fuser = TwitterUserService.getUser(objId);
if (!currUser.equals(fuser)) {
Set<TwitterUser> followers = fuser.getFollowers();
if (!followers.add(currUser)) {
followers.remove(currUser);
}
TwitterUserService.updateUser(fuser);
currUser = TwitterUserService.getUser(currUser.getObjId());