JTA - Telnet/SSH for the JAVA(tm) platform: Applet

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

Version 2.0 / 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 default.conf file in the same directory as the jar and the html file. Simply download default.conf 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="applet.conf">
  6.   <!-- 
  7.        Make sure the config file is in the same directory.
  8.        The file applet.conf looks just like default.conf.
  9.        applet.conf overrides settings in default.conf! 
  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="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. You can also set the configurations as PARAMS: see below
NAME="Applet.detach"
VALUE="boolean"
Detach the actual terminal display and its components from the browser window and run in a separate window. Use with care.
The boolean value may either be true or false. See below!
NAME="Applet.detach.fullscreen"
VALUE="boolean"
When detaching make the resulting window fill the whole screen. This might be useful for systems where people have to remote login and should get the biggest font that is possible on their screen.
NAME="Applet.detach.title"
VALUE="string"
Sets the window title of the detached applet.
NAME="Applet.disconnect"
VALUE="boolean"
If set to true, the applet will disconnect from the remote host if you leave the web page. If false, the applet will stay connected and allows the user to continue the session.
NAME="Applet.disconnect.closeWindow"
VALUE="boolean"
Closes the detached window if the connection is lost. If you want to disable this feature set it to false.
NAME="Applet.detach.immediately"
VALUE="boolean"
This parameter is usually set to false and determines if the applet should detach immediately and run if set to true or simply display the button and wait until it is pressed if false.
NAME="Applet.detach.startText"
VALUE="string"
Set this parameter if you want to use a start button to detach the applet. The default value is "Connect".
NAME="Applet.detach.stopText"
VALUE="string"
The value set here will appear as the label of the button if the applet is in detached mode and running. The default value is "Disconnect".
NAME="Applet.detach.menuBar"
VALUE="boolean"
Use this parameter if you want to disable the menubar in a detached applet. Usually that menubar is visible in a detached window but can be removed setting this parameter to false.

Important: Any configuration options you can specify in the configuration file (applet.conf or default.conf) can also appear as an applet's tag: 

<PARAM NAME="parameter" VALUE="value">
The only drawback is, before it is recognized a default value of that parameter must have appeared in one of the configuration files!
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.

Additionally you can use the Applet.Netscape.privilege property in applet.conf. It can be set to one of the security targets defined by Netscape. Most useful is the UniversalClipboardAccess or UniversalConnect

Read about the CODEBASE principals in the Overview of the Capabilities API.

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-2000 Matthias L. Jugel, Marcus Meißner
$Id: Applet.html 499 2005-09-29 08:24:54Z leo $