Hi Manoj,
There is how we created a workaround to this. Looks like all u need to
do
is get the HttpSession Object, using the Session Id. U could do this by,
extracting the SessionID from the Session, and insert into a Hashtable with
the SessionId as the key and the HttpSession as the corresponding value.
Store this Hashtable into the ServletContext. The Hashtable could also be a
Servlet Static Variable, if it is not required to be accessed from other
Servlets. Might create issues with clustering, depending on ur container.
This would work as long as the intention is to insert some values into
the
Session thus retrieved. If u need to have a request,response pair
associated with a Session thus retrieved, I don't know a way, other than
having a page use the REFRESH Meta-Tag, and the corresponding actions in the
Servlet (when this page hits the Servlet), check for some values in it's
HttpSession. The Refresh action is continued until the required values
appear in the Session. Insertion of these values from another Session can
be done the way I have said before, provided u have the Session's Id.
Hope this helps.
Hi All,
i want to get the refrence of session by using the sessionId.i am
trying this as follow:
HttpSession ObjSession=request.getSession(true);
String sesid=ObjSession.getId();
HttpSessionContext sesscontext=ObjSession.getSessionContext();
HttpSession ObjSess=sesscontext.getSession(sesid);
if(ObjSess==null) {
out.println("<br>session is null");
} else {
out.println("<br>session is not null");
}
every time i am getting "null".Sun have removed the method
HttpSessionContext.getSession(String id) from his new version of Servlet
API.but i want to use it...for some requirement in my project.can any body
suggest me how to do this.
___________________________________________________________________________
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