Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing data between JSP, Bean and Servlet session

 
Trader Joey
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can a bean with scope "session" be made to store session related data or is it better to store the session related data in a HttpSession instance ? please advice . thanks
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhil,
I didn't quite get your qstn. If you want to make an object available throughout the user session, get the user's session by
HttpSession userSession = request.getSession(true);
userSession.putValue("userName","Nikhil");
like that. We have to get an instance of the HttpSession to store a sessionwide obj isn't? Could you explain some more, about what you are asking for?
regds
maha anna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic