I am new to spring.My task is to do design and code for login and some CURD operations by using spring,hibernate and jsp.I need to pass list values from logincontroller to anothercontroller.
public ModelAndView loginProcess(HttpServletRequest request, HttpServletResponse response){
//.....
return new ModelAndView(new RedirectView("/dvd_hibernate/DvdController/dvdCURDOperation"),"userDetails",userDetails);}
I redirected to DvdController as well as passing userDetails.Is it the correct way to do?if so how to retrieve the userDetails value in anothercontroller? I didnot used annotations.
please make me to clear.
Why can’t you call dvdCURDOperation method directly within loginProcess.
If you are aiming a 302 redirect so that browser url changes to
/dvd_hibernate/DvdController/dvdCURDOperationyou will have to save userDeatils in Session and retrieve it in dvdCURDOperation method.