• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between HttpSession.getAttribute() and HttpSession.getValue()

 
Saira Murty
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends.
What is the Difference between HttpSession.getAttribute() and HttpSession.getValue()
I know that method getValue() is deprecated. I just want to know that is there any added advantage of getAttribute() over getValue() ?
-Saira Murty
 
Cindy Li
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure whether my answer is correct. I think the latest J2EE specs try to set naming conventition of dynamic objects as 'attributes'. 'value' is more likely for static objects.
Cindy
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getValue() is a deprecated version of getAttribute(). That means you don't use it in new code. The advantage of using non-deprecated methods is that your code will stay current, at least until the newer method is deprecated, if ever.
hth,
bear
[ November 07, 2002: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic