[Logo]
Forums Register Login
java beans with session scope
I have instantiated a java bean with the following code:
<jsp:useBean id="cust" class="myBeans.Customer" scope="session" />
When I display my session variables, I see that I now have a session variable that looks like this:
cust=myBeans.Customer@9fdbcb
I understand that beans that have session scope 'hang out' in the HttpSession object. What I am wondering is, what is meaning of "@9fdbcb"? Is this pointing to a place in memory for my bean?
That looks like the default toString() behaviour so it probably is related to the address. The location of the actual object is nothing special - the session is storing a reference and the actual object has not moved since you created it.
Bill
Hi Riley:
Welcome to JavaRanch and please make sure you read and comply with our "Official policy on registered names" described in: http://www.javaranch.com/name.jsp
Thanks and enjoy JavaRanch!
---
Sheriff Tony
Why is the word "abbreviation" so long? And this ad is so short?
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 1053 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 23, 2018 22:47:56.