• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

java beans with session scope  RSS feed

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!