hi gokul ,

i think this should solve the problem

HttpSession session=req.getSession(true);

regards
Rajesh
----- Original Message -----
From: Gokul Singh <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 19, 2000 3:53 AM
Subject: Re: session context problem


> from the api docs for HttpSessionContext ver 2.2
> <snip>
> getIds
> public java.util.Enumeration getIds()
> Deprecated. As of Java Servlet API 2.1 with no replacement. This method
must
> return an empty Enumeration and will be removed in a future version of
this
> API.
> </snip>
>
> Gokul
>
> ----- Original Message -----
> From: "SSM Technologies" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 20, 2000 1:28 AM
> Subject: [SERVLET-INTEREST] session context problem
>
>
> > 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.hasMoreEle
> ments());
> >
> > 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

___________________________________________________________________________
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

Reply via email to