Does the java code initialize the bean with name and id and saves it in session ? But the first parameter of WebUtils.setSessionAttribute is HttpRequest, is that ok ?
Why even store the bean as a session attribute? It's already tied to the session because it's session scoped. Whenever you access it (either using an autowired field or using the context), you will get the instance belonging to the current session - if none existed yet one will be created.
Rob Spoor wrote:Why even store the bean as a session attribute? It's already tied to the session because it's session scoped. Whenever you access it (either using an autowired field or using the context), you will get the instance belonging to the current session - if none existed yet one will be created.