• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getAttribute Doubt?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Consider the code below,

<%=((foo.person) request.getAttribute("person").getName()%>

Ths above one is from HFSJ page 345. What will happen if I don't use the getName() and just print the remaining?? Will it print something like Person@512d776 like that??
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would print the toString() representation or Person@bla123blabla
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the confirmation John!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic