Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session attribute

 
James Mark
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a)A session attribute can only be a data type that implements the serializable interface
b)A container may throw an IllegalArgumentException in the setAttribute()
method of HttpSession if the attribute is not Serializable.

which statement is true?Please help.Thanks in Advance
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please tell where you got those questions from ? And what do you think about it ?
 
James Mark
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
statement a is from MarcusGreen Summary Quiz 2
statment b is from Manning Book
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for quoting your source. I don't think that objects must be Serializable, but it must be a consideration if you are using a distributed environment, where sessions may be migrated. So neither a nor be are correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic