General J2EE: convert primitive int to Object

  1. convert primitive int to Object (1 messages)

    Hi All, I have to convert primitive int to Object. How it is possible. Please reply soon I am getting error while executing following code.. request.setAttribute("fabricatorid",fabricatorid); request.setAttribute("bannerid",bannerid); as fabricatorid is int and it required Object. Thanks
  2. try with: request.setAttribute("bannerid", new Integer(bannerid) )