Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Use of Sessions in jsp  RSS feed

 
varun bihani
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use sessions like this...
Once user logins or registers i will set the sesion values as follows
session.setAttribute("name1",value1)
session.setAttribute("name2",value2)
..
..
session.setAttribute("nameN",valueN)
AND
then i will use
session.getAttribute("name1")....and so on
in any of my jsp page.
Will this have any problems??
Thanks
 
jhong jaewon
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be... assing value.
String userid = (String)session.getAttribute("LoginUser");
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!