XRPi Home

Documentation Index
Alphabetic Index

XRPi Documentation - System Files

XWEB.CLASS

Name

XWEB.CLASS -- Java Applet.

Description

(The following is also in the HTTP-SRV manual page)

The Java applet XWEB.CLASS can be used to connect to XRPi with a web browser.

The distribution archive contains the applet file, plus 3 rudimentary .HTM pages for you to examine or experiment with.

CONNECT.HTM is the menu page for 3 types of connection, and would typically be accessed via a "connect" link on the main page. You may however wish to put the 3 connect options directly on the main page - it's up to you.

CONN23.HTM uses the Java applet to perform a normal telnet connect to port 23. The port number is configurable (see below), so you could clone the page for use with your chat server.

CONN80.HTM uses the Java applet to perform a "tunnelled" connection, which can be used via corporate firewalls which block normal Telnet.

If you wish to the above files and the applet, they must be located within the HTTP tree.

You can change the applet colours and font, the number of rows and columns displayed, and the connection mode (normal TELNET, or HTTP tunnel), using <PARAM> tags in the HTML file. For example: <PARAM NAME="font" VALUE="Courier">.

The parameters which can be specified are as follows:

        Param name     Default	  Description
        rows           22         No. of rows in text window
        cols           80         No. of columns in text window
        bgcolour       Dark grey  Applet background colour.
        borderColour   Light grey Applet framework colour.
        textBackground Black      Background for text/cmd windows.
        textColour     White      Colour of sent / rcvd text.
        font           Times      Font style for sent / rcvd text
        port           9999       TCP port number for connections.
        mode           Normal     Connection mode (normal / proxy).

The only mandatory parameter is "port". This should normally be 23 for a normal telnet connect or 80 for an http-tunnelled connect, but you may use other values if you have moved or translated your Telnet or HTTP ports.

Colours should be specified as a 24 bit hexadecimal number in 'C' style, e.g. 0xEECCFF, where the first 2 digits represent the RED value, the second two digits represent the GREEN value and the last two digits represent the BLUE value. Some browsers can only display 216 discrete colours, so you should preferably use the "browser-safe" values, which are all formed from combinations of 00, 33, 66, 99, CC and FF.

The default font is quite small, and the characters are not of a constant width, which means tables sent by XRPi will not line up correctly. You may use the "font" parameter to override the default. The recommended font is "Courier", which is slightly larger and uses constant width characters. Note: if the chosen font is not found on the client's device, their default font will be used, so stick to the common ones.

You may need to reduce the number of rows or columns displayed by the applet if you find it won't fit on a 640*480 screen. It fits nicely on 800*600, but you may wish to optimise it for another screen size, or even offer users the choice.

If you change the font, rows or cols, you may need to tweak the WIDTH and HEIGHT attributes in the APPLET tag to prevent parts of the applet from being obscured.

See also

HTTP-SRV(9) -- HTTP Server.