This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am having a trouble using a session scope variable. My requirement is to access a variable value in jsp which is defined in the java class. I am using spring ModelAndView controller. Here is the scenario.
Long var1 = form.getCommand().getSelectedIds();
I want to use the value of var1 in jsp file. And it should be in session scope.I tried below code but didn't work.
mv.addObject("var1Value", var1) in java file; and then tried to access it from jsp.
I am new to J2EE, and unable to figure out what is the problem? and how can I solve this?