>>> "Godbey, David" <[EMAIL PROTECTED]> 12-Apr-00 9:16:16 PM
>>>

>Are you quite sure about what you've said relative to running
applets in a
>PLUGIN, not the native browser JRE? Is there a way to doctor the
header of
>an output stream to embed the session id? I see that the
HttpServletRequest
>has a method to extract fields from the header. Can I create a
cookie in the
>applet and insert it into the output stream? Say by
setRequestProperty on
>the URLConnection object?

What Craig suggested was to use the JSP ability to get the session id
to set an init parameter on the applet.

You will then have to use whatever method you need to get the session
into the request you make from the applet.

You could create a cookie header as you suggest, or you could append
the session-id to the request path - this is probably the easier
option.

I presume that there is no way for JavaScript to talk to the object
(I guess that comes up against the same brick wall). But anyway, the
method suggested by Craig is the best one.

Things to check:
- that the applet is receiving the session in it's init parameter
You may have to be quite crafty about this since the applet will
probably only be initialized once. If you can't get and output stream
or a debugger to tell you what's going on then output the init
parameter to the servlet in a request header and use:
getHeader(hdrname) to display it with the servlet.

- that the JSP is presenting the session id correctly.
Use System.out to print it out on the console.


Hope this helps.


Nic Ferrier

___________________________________________________________________________
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