The Javatm Telnet Application/Applet: Applet

© 1996-1999 Matthias L. Jugel and Marcus Meißner

Version 2.0 beta / Java 2 and 1.1.x
Available under GNU General Public License

Homepage Applet Test Download Documentation Users / Opinions
Quickstart Applet Parameters

The Applet

The applet is for those people that provide terminal based services and would like to add web capabilities to it. The applet is the perfect way to make the transition from a terminal based system to a more sophisticated web based framework easier. To bring the terminal based application on the web one need to allow telnet or ssh access to it (which usually already exists) and then set up the Applet on a page on their web server. A second interesting usage is to set the applet up on your private home page and use it to be able to log in from remote locations without the need for any communication programs except a Java capable web browser.

Quickstart

To quickly have the applet up and running following the steps below:
  1. Copy one of the examples in the html directory (AppletTest.html or AppletEnhanced.html) to the directory on your web server where you would like to install the applet.
  2. Copy the jta20.jar file to the same directory on your web server.
  3. Edit the file you copied in step number one! Look for the applet tag, set the CODEBASE to "." and remove the jar/ from the archive file name.

  4. Make sure it looks like the following piece of HTML text:
    <applet CODEBASE="."
            ARCHIVE="jta20.jar"
            CODE="de.mud.jta.Applet" 
            WIDTH=590 HEIGHT=360>
        ... some more configurations but not essential now ...
    </applet>
  5. Important: There is a problem with Netscape that forces you to put the defaults.opt file in the same directory as the jar and the html file. Simply download defaults.opt and put it there.
  6. Verify that all files (html and jar) are readable for all users, so that the web server can handle them.
  7. Go to the page AppletTest.html on your web server. It should load the applet and prompt you with your telnet login. If you have a problem check the files again and have a look at the Java console of your web browser to find out what the problem is. In case you still do not understand what is going wrong have a look at our FAQ and next write to us, but include a copy of your java console contents.

Applet Parameters

The new version of the software tries to reduce the amount of parameters that you have to change to make the applet work. Instead of using these applet parameters it uses a configuration file now. Which file to use is determined by a parameter however.

Before we go into more detail on the applet parameters lets take a look at the <applet> tag in general. The example files (see documentation) usually contain a piece of html text like the following:

  1. <applet CODEBASE="../" 
  2.         ARCHIVE="jar/jta20.jar"
  3.         CODE="de.mud.jta.Applet" 
  4.         WIDTH=590 HEIGHT=360>
  5.   <PARAM NAME="config" VALUE="http://server/applet.conf">
  6.   <!-- 
  7.        Make sure the config value is a valid URL.
  8.        The file applet.conf looks just like defaults.opt.
  9.        applet.conf overrides settings in defaults.opt! 
  10.    -->
  11.   </applet>
<applet CODEBASE="../"
The first line contains the CODEBASE attribute which points to the directory where the jar archives are located. This is necessary as the example html files are in a different location. So if you put the jar files in the same directory as your applet html file you may set this to "." or simply remove the whole attribute.
ARCHIVE="jar/jta20.jar"
The next line contains the actual archive that is used to get the classes from. Using a jar archive drastically reduces the download time for the applet. In our example the jar archive rests in a directory jar/ and you need to remove that directory part if you placed the jar file in the same directory as the html file.

CODE="de.mud.jta.Applet"
The third line tells the browser which class to load as the applet. You do not need to change anything here.
WIDTH=590 HEIGHT=360>
The last line of the opening <applet> tag tells the browser how big to make the applet. In our example it has a width of 590 pixels and a height of 360 pixels. Adapt this according to your needs. In general the applet adapts its font size to match the size of the applet.

 

 
 
 

Everything else will be explained below and finally you need to close the applet definition using the </applet> tag.

The parameter format is <PARAM NAME="name" VALUE="value"> and has to appear within the <applet> and </applet> tags.
 

Parameter Documentation
NAME="config"
VALUE="URL to configuration file"
The parameter points to the configuration file for the applet. It may be either a path relative to the CODEBASE or a fully qualified URL.

This parameter replaces all following parameters that had only been implemented for convenience.

NAME="plugins"
VALUE="pluginlist"
(deprecated, use the config file) Use this parameter to define a different list of plugins to be loaded on startup of the application. Plugins are always added from back to front and are separated by comma: 

   Socket,Telnet,Terminal

The above pluginlist is the default. No whitespaces are allowed!

NAME="layout.plugin"
VALUE="direction"
(deprecated, use the config file) If a plugin is a visible component you can define where it will appear on the screen. At the moment only BorderLayout directions are understood. So you may place plugins at the Center, North, South, East and West. Usually you want to place the Terminal plugin in the center!
NAME="port"
VALUE="port number"
(deprecated, use the config file) Use this parameter to set a different port than 23. This may be necessary for the SSH plugin.
To use the applet keep in mind, a few of the following hints:
 
Java Security
Java Applet are only allowed to connect back to the server, where the classes where loaded from. So you need a web server on the computer where you want to log in. However, using our relayd program on your web server you can log into other hosts as well.

Another way is to use a signed applet. But this must be done differently for Netscape and other browsers.

Without a Web Server
People sometimes try to load the html pages without a web server from their local hard disk. This may work or it may not, as some security manager implementations do not accept local hard disks as a secure source for classes.
Copyright 1996-1999 Matthias L. Jugel, Marcus Meißner
$Id: Applet.html,v 1.5 1999/11/01 13:41:38 leo Exp $