Google

NetRexx User's Guide, version 2.02
Copyright (c) IBM Corporation, 2001. All rights reserved. ©
Draft of 22 May 2001
[previous | contents | next]

Using NetRexx for Web applets

Web applets can be written one of two styles:
  • ‘Lean and mean’, where binary arithmetic is used, and only core Java classes (such as java.lang.String) are used. This is recommended for World Wide Web pages, which may be accessed by people using a slow dial-up connection. Several examples using this style are included in the NetRexx package (e.g., NervousTexxt.nrx or ArchText.nrx).
  • ‘Full-function’, where decimal arithmetic is used, and advantage is taken of the full power of the NetRexx runtime (Rexx) class. This is appropriate for intranets, where most users will have fast connections to servers. An example using this style is included in the NetRexx package (WordClock.nrx).

If you write applets which use the NetRexx runtime (or any other Java classes that might not be on the client browser), the rest of this section may help in setting up your Web server.

A good way of setting up an HTTP (Web) server for this is to keep all your applets in one subdirectory. You can then make the NetRexx runtime classes (that is, the classes in the package known to the Java Virtual Machine as netrexx.lang) available to all the applets by unzipping NetRexxR.jar into a subdirectory netrexx/lang below your applets directory.

For example, if the root of your server data tree is


  D:/mydata

then you might put your applets into

  D:/mydata/applets

and then the NetRexx classes (unzipped from NetRexxR.jar) should be in the directory

  D:/mydata/applets/netrexx/lang

The same principle is applied if you have any other non-core Java packages that you want to make available to your applets: the classes in a package called iris.sort.quicksorts would go in a subdirectory below applets called iris/sort/quicksorts, for example.

Note that with Java 1.1 or later it should be possible to use the classes direct from the NetRexxR.jar file providing that the browser being used is at a Java 1.1 level. This may also depend on your server being set up correctly. Please see the Java documentation for details.


[previous | contents | next]