My jsp file login.jasp has below detail for form tag,
==================================
<form:form modelAttribute="user" id="loginForm" method="POST" action="logon.htm">
......
</form:form>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Login Action Class
===============
@Controller
@RequestMapping("/logon.htm")
@SessionAttributes({ "clubNumberList", "user", "club" })
public class LoginFormController {
......
......
@RequestMapping(method = RequestMethod.POST)
public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("user") User userParam, ModelMap modelMap) throws ServletException, Exception {
User user = setUserInfo(request, (User) userParam);
final HttpSession session = request.getSession(true);
UserAccessStatus accessStatus = loginHelper.getAuthorization(user);
if (accessStatus.isAuthorized()) {
List<
String> storeNumberList = loginHelper.getClubNumberList();
session.setAttribute("clubNumberList", storeNumberList);
session.setAttribute("user", userParam);
session.setAttribute("club",loginHelper.getClub(Integer.parseInt(user.getClubNumber())));
DefaultViewBean pageBean = new DefaultViewBean();
pageBean.setUser(user);
//loginRedirectView = new ModelAndView("main");
loginRedirectView = new ModelAndView("main", "command", pageBean);
return loginRedirectView;
} else {
status = accessStatus.getErrorMessage();
user.setCtHeaderMessage(status);
user.setClubNumber(null);
session.setAttribute("AuthenticationFailMsg", user.getCtHeaderMessage());
return loginRedirectView = new ModelAndView("logon");
}
}
..........
..............
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Once I login, i will get a home page where i type member info and click 'GO' submit button. When I click GO button, am getting the errors which i mentioned in my last post.
homepage.jsp
=============
<form:form method="POST" commandName="command" action="lookupCashBack.html">
......
......
<button type="submit" class="Active-button-small">
GO
</button>
.....
.....
</form:form>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
home page action class CashBackController
=============================
@Controller
@SessionAttributes({ "user" })
public class CashBackController {
..........
..........
@RequestMapping("/lookupCashBack.htm")
public ModelAndView lookupCashBack(HttpServletRequest request, HttpServletResponse response,@ModelAttribute("command") DefaultViewBean defaultViewBean, BindingResult result){
ModelAndView mv = new ModelAndView();
HttpSession session = request.getSession();
}
..........
..........
}