String name = (String) PropertyUtils.getSimpleProperty(form, "username"); User user = new User(); user.setUsername(name); request.getSession().setAttribute("user", user); return mapping.findForward("success");