This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

session.setAttribute(Constants.USER_KEY, form); "Constants" not reolving  RSS feed

 
bhavit pant
Greenhorn
Posts: 21
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers,


in the above code constant is not resolving, which class do i have to import for this,
and one more thing rather then setting user session attributes in this way can i set it in this way session.setAttribute("username", uid);
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bhavit pant wrote:hello ranchers,
in the above code constant is not resolving, which class do i have to import for this,


you have to create it yourself, or get it from wherever you got this example code.

bhavit pant wrote:
and one more thing rather then setting user session attributes in this way can i set it in this way session.setAttribute("username", uid);


Yes
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!