Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setAttribute(String name, Object value) question

 
john gomez
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Java Ranchers,
I have a dumb question. I am about to take my exam on Monday and was doing some mock tests and have run into several questions regarding setAttribute. I thought the 2nd parameter has to be an object, but I have seen several questions using something like: session.setAttribute("sortby","id"). Isn't the 2nd paramenter here a string and therefore, causes an error???
Any clarification is greatly appreciated.
Thanks.
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic