From owner-freebsd-java Mon Jun 29 16:13:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA00737 for freebsd-java-outgoing; Mon, 29 Jun 1998 16:13:15 -0700 (PDT) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from fep2.mail.ozemail.net (fep2.mail.ozemail.net [203.2.192.122]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA00715 for ; Mon, 29 Jun 1998 16:13:00 -0700 (PDT) (envelope-from joe.shevland@horizonti.com) Received: from horizonti.com ([203.33.128.245]) by fep2.mail.ozemail.net (8.8.4/8.6.12) with ESMTP id JAA20967; Tue, 30 Jun 1998 09:12:11 +1000 (EST) Message-ID: <35981F35.BA89F3E0@horizonti.com> Date: Tue, 30 Jun 1998 09:11:49 +1000 From: Joe Organization: Horizon Technologies International X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: Rasmus Kaj CC: java@FreeBSD.ORG Subject: Re: Q: AppletContext.showDocument(URL, String) References: <35953F3B.7A004A8F@horizonti.com> <19980629152808R.kaj@interbizz.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Rasmus Kaj wrote: > > >>>>> "JS" == Joe Shevland writes: > > JS> Rasmus Kaj wrote: > > >> Is there a way to tell applet viewer what to do with calls to > >> AppletContext.showDocument in the applet viewer? In a browser it's > >> straightforward, but in an applet viewer we need to tell a browser to > >> fetch and show the URL (e.g. via Netscape 'remote-control'). > > JS> The showDocument method doesn't make sense in the appletviewer > JS> context; the appletviewer is only for running the first > JS> tag within a given HTML page (i.e. doesn't > JS> display anything else). The reference to HTML frames above means > JS> you can specify the new document to appear in a new window, the > JS> current window and also special contexts like #top etc... > > Well, I think it does make sence, for at least two reasons: > > 1) Debugging: If I debug an applet which use this method, it would > be nice to know when it gets a call. Here, a notice to STDOUT or > STDERR would do nicely. Java console in Netscape or IE will do this (or java.log in IE 3.0 on Win). However, I just meant it didn't make sense in your context. It may well do, I may have just misunderstood (is English your first language?) > 2) When running an applet stand-alone. For example, I have figured > out that those 'push-technology' thingys on m$ active desktop is just Do you like crashing every two minutes? :) > XML snippets with reference to an applet (actually, they refer to a > HTML page that contains the applet and some decoration). I tried one > and found that the applet runs nicely and gets the 'pushed' things (as > far as I can see, they're not pushed, the applet queries for them > periodically, but this is probably old news). If the applet could tell > a browser to fetch web pages, those things would run correct on > FreeBSD just like that. > > JS> As to the remote control thing, did you want to control Netscape > JS> from the appletviewer? Sounds odd, but I guess you could > JS> implement a shared library under FBSD and use the Java Native > JS> Interface to call a trivial piece of C code that fires up > JS> Netscape. Hope this was relevant. > > Well, Netscape has this 'remote control' facility [1], which means > that a shell command (e.g. `netscape -remote openUrl(...url...)`) can > connect to an existing navigator process and tell it thins like 'show > this page'. I don't know much of native code, but I think this should > be fairly simple ... Just checked this out; looks fairly groovy. So you could then do a Runtime.getRuntime().exec( "netscape -remote ..." ) or similar to control Netscape. The preceding line is only from memory; it is right in spirit but maybe not in syntax or API correctness. > This could be said to be 'enlarging the applet context to merge with > the X session' if one cares for fancy terms ... :-) > > [1] http://home.netscape.com/newsref/std/x-remote.html > > // Rasmus > > -- > kaj@cityonline.se --------------- Rasmus Kaj - http://www.e.kth.se/~kaj/ > \ CityOnLine IB Production AB - http://www.CityOnLine.se/ > \--------------------- Intolerance is the last defense of the insecure -- Joe Shevland Horizon Technologies International To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message