Originally written for “Reaching the OPAC –Java Telnet”in Ariadne:the Web Version,Issue 8,March 1997 http://www.ariadne.ac.uk/issue8/java-telnet/
The Problem and a Solution
Many remote users of our library catalog  have difficulty accessing it via telnet or dial-up for several reasons. It is available via telnet through a URL on our homepage . Some problems using the OPAC include:
- Wrong terminal emulation
- Terminal emulation does not include special keys
- Lack of telnet software
- No technical support from their service providers
Possible solutions include providing all remote users with software, provide technical support for multiple packages, or ignore the problem. None of these solutions is feasible because of lack of staff and money. We couldn’t ignore the problem because we are a service oriented organization. After looking around for several months, I stumbled across Java Telnet.
Java Telnet is a Java based applet. It provides full terminal emulation for a telnet session within a web page. It is authored by Matthias L. Jugel and Marcus Meißner. It is available over the Internet for downloading at the Java Telnet homepage . The Java Telnet package is freely available under the GNU Library General Public License , popularly know as “copyleft”. Java Telnet is available in compressed format and must be “unzipped”. The package contains three major parts:
- telnet connection services.
- Terminal emulation.
- modules for configuration and local control over “look and feel”.
Using a Java based package offers many advantages among which include no need for a separate telnet program, cross-platform (at least potentially), can be used by different brands of browsers, and requires no set up by the user. It does require a Java capable browser and a microcomputer with the power to run that browser.
The applet was developed by two computer people in Germany. Matthias L. Jugel (a graduate of University of London, Birkbeck College) is employed by the German National Research Centre for Information Technology. Marcus Meißner is a Computer Science student at the University of Erlangen. He’s almost done with his diploma (MSc). Mr. Jugel “started to program the first version of the applet as a very simple thing to learn Java. When it became clear that it may be useful I asked Marcus to help me.” Both authors are involved in text-based virtual realities (called MUDs) and the applet would be a useful client to access the MUDS.
Installation and Setup
Installation and set up is simple compared to many software packages. The first step is to uncompress the software. The compressed package is available in a UNIX tgz file or as a Windows NT/95 zip file. Special care must be taken in using the uncompression program in that the directory structure must be maintained. The software must also be housed on the same machine that the telnet session will run on. This is do to security restrictions built into Java. It is possible to “redirect” a session to another telnet via a proxy server. Details on how to do that are in the package. The files use long file names so if your system should be one that allows long file names. Otherwise you will have to rename files and any of the html references will not work in the documentation and example files. After installing all of the files, make sure that they are readable by other users.
The next step involves editing the index.test.html document. The file is fully documented. Below is sample code from that page:
<APPLET CODE="appWrapper.class" WIDTH=600 HEIGHT=480> <PARAM
<!-- applet initialization: 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 --> <PARAM NAME=VTscrollbar VALUE="true">
<PARAM NAME=VTresize VALUE="font"> <PARAM NAME=VTfont
VALUE="Courier"> <PARAM NAME=VTfontsize VALUE="13"> <PARAM
<!-- modules: #1 is a buttonbar --> <PARAM NAME=module#1
VALUE="ButtonBar"> <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@rn"> <PARAM NAME=5#Input
VALUE="send#10|who"> <!-- modules: #2 is a scripting module -->
<PARAM NAME=module#2 VALUE="Script"> <PARAM NAME=script
<!-- make sure, non-java-capable browser get a message: --> <B>
Your Browser seems to have no
Please get a new browser or enable Java to see this applet! </B>
The first part of the applet coding loads a “wrapper” which controls the other parts of the software. The size of the Java window is controlled here. That is the only part you should change. You will find it necessary to change the size of the window depending on how you set parameters in the modules section of the applet. Applet initialization controls where you telnet to. You must change <PARAM NAME=address VALUE=”www.first.gmd.de“> to reflect your IP address. It can use alpahbetical or numerical addressing. It is also possbile to set the port as well. This section also sets the terminal emulation. Do not change this. Terminal emulation controls the appearance of the window and the “look and feel” by setting font and font size, terminal ID, and scrolling within the window. Play with these to get what you want. Do not change the terminal ID without reading the documentation. The next section of coding sets up the button bar. The various functions are fully explained in the documentation. Using buttons allows the user to connect or disconnect from a telnet session, send commands, detach the tenet window to a separate window, and so on. The last module controls scripting. This is one of the most useful features of this software. The login can be scripted as well as specific commands. Check the documentation for details. After making the necessary changes, save your document and test it using your browser.
Using SUNY Morrisville’s Java Telnet
Our library OPAC Java Telnet is available for public use . As you can see from the screen shot below, I have taken great pains to design the complete “environment”. Tables have been used to provide control over formatting and to list the key emulation for special keys used by our OPAC. Our library system uses DRA/MultiLis which makes use of the VT keyboard.
Figure 1: Welcome page of the Java OPAC
I made several modifications to the coding. The window size is reduced by using a smaller font size. the catalog is actually on another computer from the server. The login used puts the user into an account that send him/her to our library catalog computer while doing the remote login. After the catalog appears in the window the user must “activate” the Java window by clicking his/her mouse in it. The next step is then to use the arrow keys to select “Begin the search” and press the return key. You will then be at the main menu, as you can see from the screen shot below. This is where the special keys begin to be used. I found from trial and error that is very beneficial to have them “listed” next to the window.
Figure 2: Menu options for the Java OPAC
The applet has proven to be very easy to use and while still experimental, will continue to be available on our web site.
Update, July 1997
The JavaTelnet applet has been updated to correct various problems and to improve itsperformance. The display is now much better.
The JavaTelnet functions without any major problems with Netscape Communicator 4.01 on Windows 95 platform. I have not yet tried MacOS. The applet also functions well (actually better) witn Internet Explorer 3.01 and 4.0.
The applet can now be launched from a button. Got to the URL below for an example:
- SUNY Morrisville College of Agriculture and Technology Library Online Catalog
- SUNY Morrisville College of Agriculture and Technology Library homepage
- Java Telnet Homepage
- GNU Library General Public License, This license governs the usage and copying of software under this license designed by the Free Software Foundation. Java Telnet may be copied or used by anyone as long as they comply with this license.
- The JAVA Telnet for SUNY Morrisville Library Catalog
- Java and Java-script enhanced Library Resources. This page contains links to Java and Javscript software appropriate for use on a library webpage. It also contains actual applications.
Wilfred Drew (Call me “Bill”)
Systems Librarian, SUNY College of Agriculture and Technology
Web page: http://www.snymor.edu/~drewwe/
Address: SUNY College of Agriculture and Technology, P.O. Box 902, Morrisville, NY 13408-0902