• Post Reply Bookmark Topic Watch Topic
  • New Topic

setAttribute(String name, Object value) question

john gomez
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.
Hang a left on main. Then read this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!