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?