File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Difference between HttpSession.getAttribute() and HttpSession.getValue() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Difference between HttpSession.getAttribute() and HttpSession.getValue()" Watch "Difference between HttpSession.getAttribute() and HttpSession.getValue()" New topic
Author

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

Saira Murty
Greenhorn

Joined: Oct 07, 2002
Posts: 13
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

Joined: Oct 31, 2002
Posts: 4
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

Joined: Jan 10, 2002
Posts: 61010
    
  65

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between HttpSession.getAttribute() and HttpSession.getValue()