• Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring MVC @SessionAttributes - lifespan? Documentation about it?

Dejan Mratinkovic
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • 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

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

my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!