Check Hunter's book. (chapter 10 I think)(applet-servlet communication)
Methods to use:

(1)  RMI (Remote Method Invocation) but not all browsers,webservers etc
supports it.
(2) HTTP connection via URL object as discussed before. Your doGet and
doPost say
        takes a parameter from the HTTP request and see if the applet (that
specified that it wants the
        session object) has set that parameter and then does the necessary
processing to pass the
        session object back as a serilazed object or even text. (it depends
on how you want to program
        it).
(3) Socket connection - thsi is a direct method and has disadvantages like :
doens't necessary allow
        connection behind firewalls etc. I wouldn't use this method.


Hope this leads you in the right direction.

Sean Snyders.


-----Original Message-----
From: P.Yesudason <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: 02 May 2000 07:17
Subject: Re: Applet-Servlet


>Some outputStreams are involved here , There is a example in servlet
programming
>by Jason Hunter
>Go thru it , since it is big I am not able to explain here .
>-Yesudason P
>
>Jiger Patel wrote:
>
>> Hi yesu,
>>           Thanks for ur reply.Yesu please tell me how I can access the
>> Session object since URL Object cannot return Session object or allow us
to
>> call a method that will return session object like in RMI.Please send me
a
>> sample code snniplet to demonstrate it.I had thought of URL object but
could
>> not think how to do it. Please help me.
>>
>> Thanks in advance,
>> Jiger
>>
>> >From: "P.Yesudason" <[EMAIL PROTECTED]>
>> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>> >        Servlet API Technology." <[EMAIL PROTECTED]>
>> >To: [EMAIL PROTECTED]
>> >Subject: Re: Applet-Servlet
>> >Date: Sun, 30 Apr 2000 14:29:30 +0530
>> >
>> >Jiger Patel wrote:
>> >
>> > > Hi Friends,
>> > >              Can anybody tell me how to access values from Session
>> >object
>> > > put in by the Servlet from an applet to update itself.
>> >
>> >You can use a URL object to i
>> >"http://sample:8080/servlets/MyServlet "
>> >nvoke a servlet  then you can try to get the session from there .
>> >It is possible.
>> >
>> >
>> > >
>> > > Secondly how to invoke a servlet from an Applet.
>> > >
>> > > Thanks in advance,
>> > > Jiger
>> >
>> >-Yesudas
>> >
>> > >
>> > >
________________________________________________________________________
>> > > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com
>> > >
>> > >
>>
>___________________________________________________________________________
>> > > 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
>> >
>> >--
>> >I am free and have a destination too far,
>> >                       .... I will keep flying.
>> >
>>
>___________________________________________________________________________
>> >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
>>
>> ________________________________________________________________________
>> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>>
>>
___________________________________________________________________________
>> 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
>
>--
>I am free and have a destination too far,
>                      .... I will keep flying.
>
>___________________________________________________________________________
>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

Reply via email to