I've been following this thread closely because it almost answers my
problem, but not quite. Perhaps you can help.
Add Applet - Servlet connection for good measure.
I started with a "thin" applet, using <APPLET> tag. I took over some code
that was making round trips to a servlet (GIS mapping servlet actually)
setting up some objects and stashing them in a session. Return trips from
the applet told it how to display the maps (zoom, pan, those sort of
things.) Everthing was peachy: the session objects were available on the
return trips.
As part of my task, I was asked to upgrade the applet to Java 1.2. So I
replaced the <APPLET> tag with <OBJECT> and <EMBED> for the 1.2 plugin.
Well...everything broke. I'm using Servlet Exec 2.2 BTW.
After thrashing for a couple of days I discovered that what happened was
every round trip to the servlet created a new session with
HttpSession session = req.getSession(true) instead of recognizing a previous
session. So my maps were no longer coming back. I've solved the problem
using session.getServletContext to get my old session back passing the
session id back and forth between applet and servlet. However, the
HttpServletContext class is deprecated, so this solution's days are
numbered.
The books Hunter and Goodwill both seem to imply that session tracking is
magically handled using the API, and it was using 1.1 (<APPLET> tag).
What happened and what is the appropriate way to session track in 1.2
between applet and servlet? Or do I have a bug in Servlet Exec?
Thanks folks,
Dave Godbey
> -----Original Message-----
> From: Nic Ferrier [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 10, 2000 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: SessionId = null
>
> Cool new address BTW.
>
> I hope they're paying you for all this.
>
>
> >Of course, this knowledge doesn't really do you a lot of good
> because
> >you cannot do much useful with the id once you have it.
>
> Are you going to suggest a depreceation for this in CAFE?
>
> It seems a logical conclusion to what you're saying (which I agree
> with).
>
> I can't see a reasons for a servlet knowing the id. I understand that
> the implementation must know but that will have access to it anyway.
>
>
> Nic
>
> __________________________________________________________________________
> _
> 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