473,322 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

jsp - different session.getAttributes

Hi!
I wonder if there is a difference [if so, what] between:

User user = (User)session.getAttribute("user");

and:
User user = (User)request.getSession(false).getValue("user");

/peter
Jul 17 '05 #1
1 5563
"asaguden" <as******@lycos.com> wrote in message
news:b1*************************@posting.google.co m...
Hi!
I wonder if there is a difference [if so, what] between:

User user = (User)session.getAttribute("user");

and:
User user = (User)request.getSession(false).getValue("user");

/peter


request.getSession(false) and session refer to the same object, as does
request.getSession(true). The difference is that the latter will create a
session object if one does not exist. The difference between getAttribute
and getValue is that getValue is deprecated. Use getAttribute.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve | last post by:
Hi, I need to be able to open another browser from within an already opened browser with a completely new session (using the same session variables). How can I do this? In essence, I want to...
4
by: xenny | last post by:
Hi, I'm trying to see if a file (exportfile) is set to read only using File::GetAttributes: if ((File::GetAttributes(exportfile.c_str()) & FileAttributes::ReadOnly) != 0); {...
3
by: RCS | last post by:
I have an app that I have different "sections" that I want to switch back and forth from, all while having the server maintain viewstate for each page. In other words, when I am on Page1.aspx and...
1
by: David Gaudine | last post by:
(This is a bit like the recent thread "PHP Switching Sessions".) I use session_start(). When I open my web-based application in two windows on the same system, there's a definite clash; I can't...
7
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right...
0
by: 'Mani | last post by:
Hi All, I need to abandon a different session and want to know how to do this. Session.Abandon() will abndon only the current session associated with the current request. But, my necessity is...
5
by: daveyand | last post by:
Guys, I'm having issues with getAttributes. I have done the following. attr_list = document.getElementById("image_id").getAttributes(); I want to be able to loop around the attributes...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
2
by: sugapablo | last post by:
I have a server where two different users are each running a different web application. I installed SugarCRM for one, and Info@Hand (built from SugarCRM) for the other. Both are trying to save...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.