It's not a secret anymore!
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "creating session in JSP" Watch "creating session in JSP" New topic

creating session in JSP


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

Joined: Mar 22, 2000
Posts: 13036
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.

author of:
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at
thanks for your cooperation.
- satya

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: creating session in JSP
It's not a secret anymore!