Should we build RMI applets?

From: Phil Powell (soazine_at_erols.com)
Date: 03/24/04


Date: 23 Mar 2004 21:11:00 -0800

I am referring to this piece I read at
http://java.sun.com/developer/technicalArticles/RMI/rmi/ :

Despite supporting the majority of the Java 1.1 specification, the
most popular web browsers -- Netscape Navigator and Microsoft Internet
Explorer -- do not adequately support RMI. Navigator supports RMI on
most platforms but does not support HTTP tunneling, so Netscape users
connected to the web through a proxy server can't use an RMI applet.
Meanwhile, Netscape for the Macintosh does not support RMI at all.
Internet Explorer 4.0-5.0 also lacks RMI support, although a patch is
supposedly available to add the missing classes (the RMI classes are
available from Microsoft's web site, but instructions for installing
them is not provided). As a result, a large percentage of Internet
surfers can't use RMI applets in their current browser.

This is posing a problem to an alternative I am contemplating for my
chatroom I built, which currently functions just fine (finally!) as a
PHP/JSP front end with one servlet and a package of Java classes with
XML on the back end. However, MSIE users are experiencing annoying
pops or flashes when the screen refreshes, which is part of a
frameset.

So I thought the best alternative is to give users the choice of an
HTML screen (frame) or an applet. The applet, naturally, would take
unfortunately a very long time to load (as applets now seem to do for
most M$ users out there that I have talked to), nonetheless, it is an
alternative.

Because of the architecture, everything has to be done remotely, the
applet, the servlet that will handle the messaging, the messaging
classes, etc. That is, everything is housed in the same directory on
a remote server, of which I do not have command-line access to start
a chat server.

I tried before with using an applet, but when the applet, which I
understand is instantiated by your JVM on your machine, tries to
instantiate the servlet, which I understand is instantiated by the JVM
on the remote machine, any classes the servlet instantiates will not
be recognized by the applet, resulting in the NoClassDefFoundError
messages I would get.

That's where I think RMI would come in, if I'm not mistaken, whereby I
would use RMI to cause the objects to travel from the remote server's
JVM-created instance to the applet's JVM-created instance. Am I
correct in assuming this to be so, and if so, how would I then
architecture either my applet, servlet, or classes the servlet uses to
use RMI successfully within the framework I mentioned earlier?

Sorry so long-winded, but I wanted to make sure I thoroughly explained
myself before I ask for some advice.

Thanx
Phil



Relevant Pages

  • Re: applet as servlet BACK end
    ... Requests are sent as serialized objects ... >> down the stream connecting the applet to the servlet. ... shutdown Tomcat because I couldn't get the RMI registry thread to end. ...
    (comp.lang.java.programmer)
  • Update JSP with RMI??
    ... Is it possible to update JSP with RMI by servlet?? ... Or only with applet?? ...
    (comp.lang.java.programmer)
  • Screen Resolution
    ... applet interacts with xorg.conf and the X-Server. ... this up as a supported resolution). ... However, two of my other images won't support a 1280x1024 mode, even ...
    (GNOME)
  • Screen Resolution
    ... applet interacts with xorg.conf and the X-Server. ... this up as a supported resolution). ... However, two of my other images won't support a 1280x1024 mode, even ...
    (GNOME)
  • web browser applet
    ... I am looking for a java applet that provides the main capabilities of a web ... coding support for the different scripting languages or running other ... I could develop a standalone browser that runs on W32 that meets my needs, ...
    (comp.lang.java)