Try this-
HttpSession session=req.getSession(true);
Vijaylakshmi S
Senior Software Engineer
IT Solutions (I) Pvt. Ltd.,
Chennai
SSM Technologies
<[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
Sent by: "A mailing cc:
list for discussion Subject: session context problem
about Sun
Microsystem's Java
Servlet API
Technology."
<SERVLET-INTEREST@jav
a.sun.com>
12/20/00 01:28 AM
Please respond to "A
mailing list for
discussion about Sun
Microsystem's Java
Servlet API
Technology."
Hello,
I am using the HttpSessionContext & HttpSession
for tracking the sessions of multiple users.
Code is as follows:
HttpSession session=req.getSession();
HttpSessionContext context=session.getSessionContext();
Enumeration ids=context.getIds();
System.out.println("****************************************"
+ids.hasMoreElements());
while(ids.hasMoreElements()){
System.out.println("It is session context loop");
String id=(String)ids.nextElement();
System.out.println("Checking id"+id);
}
O/p of ids.hasMoreElements() is "false",which means session object created
is
not referring to the HttpSessionContext context. Please suggest a method to
bind the session to the HttpSessionContext.
thanks,
Viraj
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html