• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring MVC @SessionAttributes - lifespan? Documentation about it?

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posted the same question on Spring forum, no luck, let's try here.

I am new to Spring MVC.

So far, I have kept session as clean as possible. Spring MVC seems to encourage session usage via @SessionAttributes

But, I couldn't find any docs describing in detail how this annotation actually works. All I have found are posts on forums from people asking similar question.

I got not much information from http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/bind/annotation/SessionAttributes.html

What is lifespan of @SessionAttributes?
To me, after couple of tests, it seems like once another controller is started, the one does not have same session attribute like the previous one, all attributes are cleared (only
@SessionAttributes

defined at that class remain in session), regardless of


. For example, user does not go to SAVE option afetr editing object, but goes to another menu option, so


is never called.

Is my observation correct? Is there any official documentation to back it up?

Btw. I am using Spring 3.0.3

Thanks.
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic