The package contains several parts of which the most important one is the Telnet Applet/Application. Select from the list below what you are interested in. If you only want to use the applet choose Telnet from Setup and if you want to use the packages in your own programming, select the appropriate from Source Code.
[
Telnet |
Terminal Emulation |
Modules
]
[
Applet Wrapper |
Proxy Server
]
[
Telnet |
Terminal Emulation |
Modules
]
[
Applet Wrapper |
Proxy Server
]
[
Packages |
Field and Method Index |
Class Tree
]
Get the latest
version here!
To install the applet on your web page you need as least the following files and directories. Make sure that all files and directories are readable by other users!
index.test.html telnet.class appWrapper.class display/ display/SoftFont.class display/CharDisplay.class display/Terminal.class display/TerminalHost.class display/vt320.class socket/ socket/TelnetIO.class socket/StatusPeer.class modules/ modules/Module.class modules/Script.class modules/ButtonBar.class modules/MudConnector.classNow edit index.test.html to adapt it to your needs or look at the example below! The file is documented and if you have questions about the Modules refer to the Module Documentation or look at the Source Code. You will find, that not telnet.class is loaded as applet, but appWrapper.class instead. This is necessary to enable the detach feature!
The telnet applet can be customized using the following parameters:
<PARAM NAME=address VALUE="tanis.first.gmd.de"> <PARAM NAME=port VALUE="23"> <PARAM NAME=emulation VALUE="vt320"> <PARAM NAME=proxy VALUE="www.first.gmd.de"> <PARAM NAME=proxyport VALUE="31415">The proxy and proxyport parameters may be left out. They are needed if your target host is NOT the same as your web server and you are using the relay daemon.
<APPLET CODE="appWrapper.class" WIDTH=600 HEIGHT=480> <!-- appWrapper parameters --> <PARAM NAME="applet" VALUE="telnet"> <!-- optional (WIDTH and HEIGHT should be changed!) --> <PARAM NAME="startButton" VALUE="Connect to www.first.gmd.de!"> <PARAM NAME="stopButton" VALUE="Shutdown telnet!"> <PARAM NAME="frameTitle" VALUE="The Java Telnet Applet: WWW"> <!-- applet parameters: address and port and emulation --> <PARAM NAME="address" VALUE="www.first.gmd.de"> <PARAM NAME="port" VALUE="23"> <PARAM NAME="emulation" VALUE="vt320"> <!-- terminal emulation parameters (optional)--> <PARAM NAME="VTscrollbar" VALUE="true"> <PARAM NAME="VTresize" VALUE="font"> <PARAM NAME="VTfont" VALUE="Courier"> <PARAM NAME="VTfontsize" VALUE="13"> <PARAM NAME="VTid" VALUE="vt220"> <PARAM NAME="VTcharset" VALUE="ibm"> <!-- module parameters: #1 is a buttonbar (optional) --> <PARAM NAME="module#1" VALUE="ButtonBar@North"> <PARAM NAME="1#Button" VALUE="connect|\$connect()"> <PARAM NAME="2#Button" VALUE="disconnect|\$disconnect()"> <PARAM NAME="3#Button" VALUE="Detach/Delete Window|\$detach()"> <PARAM NAME="4#Button" VALUE="Send:|\@send@\r\n"> <PARAM NAME="5#Input" VALUE="send#10|who"> <!-- module parameter: #2 is a scripting module (optional) --> <PARAM NAME="module#2" VALUE="Script"> <PARAM NAME="script" VALUE="login:|leo"> <!-- make sure, non-java-capable browser get a message: --> <B> Your Browser seems to have no Java support. Please get a new browser or enable Java to see this applet! </B> </APPLET>
The applet supports the special graphical character set of VT terminals. The new implementation supports all graphical characters with a small drawback. The more graphical characters on the screen the slower is the display. We will remove the current implementation when full UNICODE support is available from all browsers (full JDK 1.2 compatibility).
To configure the terminal emulation look at the list of parameters below:
Note: Default values are typeset in italics and other possible
values in bold.
<PARAM NAME="VTcolumns" VALUE="80">
<PARAM NAME="VTrows" VALUE="24">
<PARAM NAME="VTfont" VALUE="Courier">
<PARAM NAME="VTfontsize" VALUE="14">
<PARAM NAME="VTresize" VALUE="font">
<PARAM NAME="VTscrollbar" VALUE="false">
<PARAM NAME="VTid" VALUE="vt320">
<PARAM NAME="VTbuffer" VALUE="xx">
<PARAM NAME="VTcharset" VALUE="none">
Please look at the example above.
To load a module a special parameter has to be added to the applet PARAM tags:
<PARAM NAME=module#number VALUE="modulename@direction">
At the moment the package features three modules:
To load the module include the following tag into the .html file (example):
<PARAM NAME=module#1 VALUE="ButtonBar">Below is a description of possible PARAM tags and a description of supported functions:
<PARAM NAME=number#Button VALUE="buttontext|buttonaction">
simple textto be sent to the remote host. Newline and/or carriage return characters may be added in C syntax \n and \r. To support unimplemented function keys the \e escape character may be useful. The \b backspace character is also supported. The text may contain field reference(s).
\$connect(host[,port])tries to initiate a connection to the host at the port, if given. The standard port is 23. host and port may be hostname and number or field reference(s). If a connection already exists nothing will happen.
\$disconnect()terminates the current connection, but if there was no connection nothing will happen.
\$detach()detaches the applet from the web browser window and creates a new frame externally. This may be used to allow users to use the applet while browsing the web with the same browser window.
<PARAM NAME=1#Button VALUE="HELP!|help\r\n"> <PARAM NAME=2#Button VALUE="HELP:|help \@help@\r\n"> <PARAM NAME=4#Button VALUE="simple|\$connect(localhost)"> <PARAM NAME=5#Button VALUE="complete|\$connect(www,4711)"> <PARAM NAME=6#Button VALUE="connect|\$connect(\@address@)"> <PARAM NAME=8#Button VALUE="connect to port|\$connect(\@address@,\@port@)"> <PARAM NAME=10#Button VALUE="window|\$detach()">
<PARAM NAME=number#Input VALUE="fieldname[#length]|initial text">
\@fieldname@The \@fieldname@ macro will be replaced by the string entered in the text field.
<PARAM NAME=3#Input VALUE="help#10|"> <PARAM NAME=7#Input VALUE="address|www.first.gmd.de"> <PARAM NAME=9#Input VALUE="port#5|4711">
To load the module include the following tag into the .html file (example):
<PARAM NAME=module#1 VALUE="Script">Below is a description of possible PARAM tags and a description of script:
<PARAM NAME=script VALUE="pattern|text|...">
"login:|leo|Password:|mypassword|leo@www|ls"Newlines will be added automatically to the string sent! At the moment the order of the pattern and text pairs is not relevant.
<PARAM NAME=module#1 VALUE="MudConnector">The MudConnector expects the following PARAM tags:
<PARAM NAME=mudlist VALUE="URL">
<PARAM NAME=mudlist VALUE="http://www.mud.de/~leo/mudlist.data">
Simply using the telnet applet in the following manner:
<APPLET CODE="telnet.class" WIDTH=600 HEIGHT=480>and using the detach function stops the applet after you have detached the applet and want to browse the web again. It seems that the Web browser stops all threads connected to the applet if you leave the page where the applet is located and thus it doesn't even update its display anymore.
We have found out that this is not true for applets loaded within the applet on the page (e.g. the appWrapper). Look at the following description on how to setup the appWrapper. It will probably work with any given applet out on the web!
<APPLET CODE="appWrapper.class" WIDTH=600 HEIGHT=480> <PARAM NAME=applet VALUE="telnet> <!-- all other telnet applet parameters go here --> </APPLET>The appWrapper knows only about the PARAM tag applet, which is the applet to be loaded. In this case it must be in the same directory as the appWrapper.class. Refer to the telnet example above for the telnet parameters.
The proxy is used to redirect a connection to a given host. Usually an applet can only connect to the web server it has been loaded from. Installing the proxy on your web server allows the applet to connect to a host you would like to connect to.
On the WWW-Server command line run the proxy server as follows:
java proxy 9999 remotehostname 23This lets the proxy listen on port 9999 and it redirects all connections to the host "remotehostname" at port 23. You can leave the port parameter out if it is 23 (telnet port).
The proxy should start with something like the output below:
proxy: destination host is remotehostname at port 23 proxy: listening on port 9999Upon successful connection the output should produce something like this:
proxy: accepted connection from augra.first.gmd.de proxy: connecting www.first.gmd.de <-> remotehostname
java proxy 9999 remotehost 23 >& errorlog &to put it into the background. The "errorlog" file should then contain any messages. You can kill that process by looking for the process id (ps | grep proxy) and issuing the kill <processid> command (this applies to UNIX only).
relayd serverport targethost targetport or just relayd serverport targethostIt will then listen on the serverport of the machine you started it and connect to the targethost. The standard targetport is 23.
The daemon expects a string
relay address portIt must be run on the web server of the applet. The relay daemon is not included in compiled form, because we would have to support a number of platforms. However, you can write to us if you need a special compiled version for your hardware platform.
You should include the following tags to tell telnet that it is supposed to use the prox server
<PARAM NAME=proxy VALUE="www.first.gmd.de"> <PARAM NAME=proxyport VALUE="31415">
Select from the structure below, what you would like to see. Each file contains a Version: field determining its current status and version. If you are not sure to have the most current version, please look here.
If you are unsure, whether you've got the newest version, compare your copy of the file REVISION and this REVISION, which is a direct link to the home page. The latest changes are documented in the file CHANGES.