I am not following you Mukhar. The session id is being saved, atleast when
run with IE, because I have been able to retrieve it at the servlet level.
I can retrieve the saved session with IE but Netscape returns null. So,
Netscape either does not let me save the session or does not let me retrieve
it for some reason.
To answer Christophers question: I am actually setting the attribute in a
jsp page which then uses a jsp tag to call the applet.
"session.setAttribute("obSession", obSession);" sets my obSession attribute
in the jsp. The applet then calls several servlets to populate various
fields of the applet. The servlets use "HttpSession session =
request.getSession(false);" to retrieve the session and then retrieve the
attribute from the session. This is where the problem lies, Netscape
returns session = null, IE returns the valid session.
'session' is a predefined variable or implicit object of jsp just like
'out', 'response' and 'request'
This works like a gem using IE 5.5. Bring it up with Netscape 4.75 and the
session is returned null.
I'm wondering if this has something to do with the directory structure and
placement of my servlet classes under Tomcat 3.1???
dennis
-----Original Message-----
From: Kevin Mukhar [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 6:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Netscape and session tracking
Dennis Sasinka wrote:
>
> I have looked through the archive and seen similar questions but no clear
> answers.
>
> I have an applet that stores an attribute using
> "session.setAttribute("name", value)" and then calls several servlets.
When
> calling the servlets, any attempt to retrieve the session using
> "request.getSession(false)" is returned null (yes, it returns a new
session
> when set to true but that does me no good). This only happens in
Netscape,
> IE works fine. I'm running Netscape 4.75 and IE 5.5, Servlet API 2.2 and
> Tomcat 3.1. Can anyone help?
It sounds as though your applet is not saving/returning the session id
to the server. When an applet (or any application other than the
browser) is the client, then the applet is responsible for reading the
session-id cookie sent by the servlet container, and returning the
session id when it next connects to the server. Information on session
tracking is in the archives.
You can also look at the example here: http://pages.about.com/kmukhar. I
wrote the example more to show applet-servlet communication, but the
applet code shows an applet sending a cookie to the server. For session
tracking, you do not need to send or read the cookie from the servlet,
that is handled by the servlet container.
K Mukhar
___________________________________________________________________________
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