Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getValue - returns new / old ?

 
sonali ag
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I called getValue() on session attribute.
servlet spec says that it returns old value for replaced attribute.
But I am getting new value.

Can anyone clarify it?
 
Hasnain Javed Khan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonali,

I called getValue() on session attribute.


Can you give a clear explanation ?

HttpSession Interface's getValue() method has been deprecated.

Are you talking about HttpSessionBindingEvent's getValue() method ?

Kind regards.
Hasnain.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Show us how you're doing it.
 
sonali ag
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I called getValue on event object .
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonali.
I called getValue() on session attribute.
servlet spec says that it returns old value for replaced attribute.
But I am getting new value.

Can anyone clarify it?

It will return old value for replaced attribute. Can you please tell, which container/server you are using?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sonali ag wrote:I called getValue on event object .

I mean please show us everything. The listener, the way you change attributes...
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the answer is the old value. There is a question in the Mock exam in HFS&J book.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic