>>> Ernie V <[EMAIL PROTECTED]> 10-Feb-00 1:52:53 PM >>>

>> Hi,
>>     I would like to know how I can reverse the client-server
methodology
>> so that the client (applet) can be made aware of stuff
asynchronously.
>> Nic Ferrier had mentioned something to this effect in one of the
mails
>> in the archives and I am interested in knowing if anyone tried it
out.
>> And if there is a mini-HTTP server that I could use for JWS
running on
>> NT environment.

Yes... I have done it (horses mouth and all that).

It depends what you want to use it for... implementing an http server
inside the applet environment is possible but restricted by the
security restrictions imposed on the applet environment. In particular
you must remember the restriction that an applet can only create a
socket to the host that it came from. This means that you must always
have a server that provides the download of the applet and handles all
the applet's server's requests.

I used it to provide a chat/bulletin system using Http and avoiding
polling. When the user chatted he used a POST to a servlet... when
there was chat to recieve the server sent an http POST request to the
applet's servlet engine with the data. The applet had access to the
servlet because I used GNU-Paperclips (although an earlier version
than is available now) which is embeddable and allows you to load
servlets that are declared previously.

As far as asynchronous connections are concerned this can be done
because servlets can use HTTP/1.1 keep-alives to hold connections
open.

As I said in the post on the list previously though, proxy behaviour
is the key. A proxy might not maintain persistent connections on
either side of it.

However, if you have a server inside the applet environment you can
get near to asynchronous comms (but with a performance drop) just
using traditional call and response HTTP.

Lastly, note that whatever embeddable servlet-server you use it's
likely to be quite large and therefore take time to load into the
browser.


>This is most easily done using the standard Java extension
>As to your second question, I'm not sure why you would want to use
>another webserver other than the one that comes with JWS.

You might want to do this because the JWS server is not easily
embeddable.



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