wood burning stoves 2.0*
The moose likes Servlets and the fly likes creating session in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "creating session in JSP" Watch "creating session in JSP" New topic
Author

creating session in JSP

praveen_i
Greenhorn

Joined: Jul 24, 2001
Posts: 3
I'm doing a chat program ,wherein i have to display all the users who have logged in,i'll be creating a session for each user who logs into the chat.But the problem is,there r multiple chat rooms ,how to keep track of which user is in which room??Maybe,this may seem like a simple question,but please do help me in this regard?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
The simplest thing to do is store that kind of information in a HttpSession object. In a JSP you automatically get a session object unless you turn it off.
Bill

------------------
author of:
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

"praveen_i"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
 
subject: creating session in JSP