
To activate the Java interpreter, use the form from your server
manager. When you activate the Java interpreter, it will ask you for a 
directory to use for Java server applets. Java server applets are similar to 
CGI programs.  Java server applets are different from NSAPI Java objects, 
because for Java applets you do not need to edit obj.conf to activate new 
applets. To access a Java server applet, activate Java for your server and 
then access /server-java/SomeClass where SomeClass.class exists in your server 
applet directory.

There are a number of example programs in the applets directory.
The more interesting ones are BrowserDataApplet.java, Connect.java, 
FormApplet.java, and RandomApplet.java. The rest are tests we use to 
exercise the interface. Note that these tests are all NSAPI Service type
functions, but you can create other types of functions.

To compile Java programs, there is a Makefile in the local-classes
directory. You may add your own there. Note that you need javac, which
is part of Sun's Java SDK, to compile the programs. There are
precompiled versions of the examples here to let you play with them.

Most Java applets have names ending with Applet (BrowserDataApplet, 
RandomApplet, etc.).

To run the Java applets in the java/applets directory, in most cases
no changes are needed to the obj.conf file. For example, the applet
BrowserDataApplet returns information about the browser being used. To invoke
it just enter
		  /server-java/BrowserDataApplet

under the URL location prompt of your browser.

To run the applet RandomApplet, you may need to add a mapping (virtual path)
to a directory that contains the images to be displayed. In the standard
release, there is a directory under server root, ns-icons that contains a 
number of .gif files.  By default this is already added to your server's 
obj.conf file:

NameTrans from="/ns-icons" fn="pfx2dir" dir="/usr/ns-home/ns-icons"

where /usr/ns-home is my server's root directory.  You can other directories
in this same manner.

To invoke RandomApplet, just enter

		 /server-java/RandomApplet/ns-icons

under the URL location name and you will see images in random sequence 
everytime the applet is run.

Other sample applets:

Throw - prints a message to the logs/errors file.
FormApplet - a simple form handler.  Must be the ACTION url for an HTML form
Multi - a multipart content example
Multi2 - optimized version of Multi
RandomApplet2 - same as RandomApplet but shows just the image
Connect - uses the server to pull an HTML page from the net.


