PageController
@RequestMapping(value = "page.html") public String page(HttpServletRequest request){ UserVo userVo = userDao.getUserById(1); request.setAttribute("userVo", userVo); return "page"; }
page.jsp
<form action="nextPage.html" method="post"> <input type="hidden" value="${userVo.getId()}" name="id"> <input type="hidden" value="${userVo.getUserName()}" name="userName"> <input type="hidden" value="${userVo.getUserId()}" name="userId"> <input type="submit" value="submit"> </form>NextPageController
@RequestMapping(value = "nextPage.html") public String createNewIncident(UserVo userVo){ System.out.println(userVo.getUserName()); return "nextPage"; }
@RequestMapping(value = "page.html") public String page(HttpServletRequest request){ UserVo userVo = userDao.getUserById(1); request.setAttribute("userVo", userVo); return "page"; }