Good question! I've been wrestling with this problem for a different reason.
Try tracking servlet sessions from a plugin without this class!
I have a proposal.
How do I go about requesting a method from Sun? And do you folks concur? Or
do you have a better idea?
Problem:
Applet-servlet communication when applet lives in Java JRE plugin (1.2 for
example).
When an applet is running in JRE plugin (I assume plugins will be around for
as long as browser releases lag Java releases), it is actually running in a
different application than the browser. As a result, they do not share
cookies.
What this means is that it is difficult tracking servlet sessions given this
situation.
Temporary solution:
A temporary solution is to capture the sessionId first trip to servlet and
pass it back and forth between applet and servlet subsequently to maintain
state. To set the desired session containing the session variables of
interest, you can use HttpSession.getSessionContext, then pass the sessionId
string to the HttpSessionContext.getSession method to get your old session
back.
Problem with this approach is that HttpSessionContext class and
HttpSession.getSessionContext method have been deprecated for security
reasons. I suppose that my suggestion, while perhaps narrowing the security
hole a bit, still leaves the security issue unresolved. But how else might
this be done? I haven't explored using JavaScript to get the cookie to the
applet yet, but assuming it works, its going to be pretty cumbersome.
> -----Original Message-----
> From: Lallement [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 12, 2000 10:53 AM
> To: [EMAIL PROTECTED]
> Subject: HttpSessionContext
>
> In my application, I'd like to use HttpSessionContext to share data
> between
> servlets.
> But HttpSession is deprecated with no replacement.
> How can I replace it ?
>
> tx
>
> __________________________________________________________________________
> _
> 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