Is it possible to configure a Spring session scoped bean with attributes from the session?

Posted by Dave G on Stack Overflow See other posts from Stack Overflow or by Dave G
Published on 2010-04-09T17:14:51Z Indexed on 2010/04/09 18:43 UTC
Read the original article Hit count: 393

Filed under:
|
|

I'm trying to create a service bean that when referenced will be initialized with HttpSession based attributes.

Let's say for sake of argument that my webapp would do the following:

  1. Establish a session
  2. Request login & password
  3. When service is requested (it is scope="session" and has init-method="init()") a new instance is created for the session.

In the init method, can I reference the HttpSession either through passing it in as a parameter and referencing it by EL?

Any ideas on this would be appreciated.

© Stack Overflow or respective owner

Related posts about spring

Related posts about spring-mvc