Re: Pushing data to an Applet

Matt Penner <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
The applet could use some sort of a session.  Since you're programming the
applet it could just send an HTTP request to your servlet with the session
values and let the servlet do the work.  I haven't done this before so if you
can't send actual standard session info then just send a unique ID that
identifies that user and their applet instance.

Matt


Quoting Joe Chen <[email protected]>:

> One possibility is for the servlet to keep on streaming
> back data in the response.  Even if there is no data change,
> servlet sends something back periodically to keep the original
> connection alive.  This does mean you tie down one connection
> and thread on the server side for each client applet.  And if
> the applet lost the connection, it can re-establish another one.
>
> I have not done this myself so I don't know what other issues
> this may cause.
>
> regards,
> -Joe
>
> -----Original Message-----
> From: Bhushan Bhangale [mailto:[email protected]]
> Sent: Friday, February 14, 2003 1:07 AM
> To: [email protected]
> Subject: Re: Pushing data to an Applet
>
>
> Dear Uwe,
>
> I read it but it uses RMI and Socket which is not possible for me as the
> users who will browse the applet will be outside the firewall.
>
> Regards
> Bhushan
>
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[email protected]] On Behalf Of
> Klosa Uwe
> Sent: Friday, February 14, 2003 1:10 PM
> To: [email protected]
> Subject: SV: Pushing data to an Applet
>
>
> Bhushan,
>
> read the chapter in the book an you will understand.
>
> Regards
> Uwe
>
> -----Ursprungligt meddelande-----
> Fran: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[email protected]]For Bhushan
> Bhangale
> Skickat: den 14 februari 2003 03:57
> Till: [email protected]
> Amne: Re: Pushing data to an Applet
>
>
> Dear Ross,
>
> I don;t need Applet to Servlet communication help. Please read my mail
> again.
>
> Regards
> Bhushan
>
> -----Original Message-----
> From: Ross Rankin [mailto:[email protected]]
> Sent: Thursday, February 13, 2003 9:08 PM
> To: 'Bhushan Bhangale'
> Cc: [email protected]
> Subject: RE: Pushing data to an Applet
>
>
> The book Java Servlet Programming has a great example of Applet to
> Servlet HTTP communication and the code examples are online at
> http://www.servlets.com. Check out this link for the Applet to Servlet
> chapter examples:
> http://www.servlets.com/jservlet2/examples/ch10/index.html
>
> Remember, if you want to use the classes in the book, you need to own a
> copy according to the license agreement.
>
> Ross
>
> -----Original Message-----
> From: Bhushan Bhangale [mailto:[email protected]]
> Sent: Wednesday, February 12, 2003 9:48 PM
> Subject: Pushing data to an Applet
>
> Hi,
>
> I have a Java Swing applet in my site. It talks to server via Applet to
> Servlet Communication. There is one application running at the server
> side, which processes some order.
>
> Now the functionality which I have to build is that the application
> should be able to push orders to the applets, so that the users who are
> currently watching the applet should be able to see the latest data
> automatically without sendinga request.
>
> I searched on web but couldn't find anything as to how can I push data
> to all the connected applets of the site.
>
> The solution which I thought is the applet will poll the server after
> every say 1 minute to check if there is any new to show. But suppose the
> number of user is more and there is nothing new to show, the applets
> will unnecessary making the request to the server.
>
> I can't use Socket connection or RMI as the site will browsed outside
> the firewall. Is there any way by which I can push data from server to
> applets, so that when ever new thing will come server will make
> connection with applets and push data thereby using network only when
> needed. Unlike in polling the network is used unnecessarily.
>
> Regards
> Bhushan
>
> ________________________________________________________________________
> ___
> 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
>
> ___________________________________________________________________________
> 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
>

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.