Creating an HTML Page to Start a Telnet Session

You can create your own HTML page to start a mainframe session over the web. To establish a Telnet connection, you must use the Connect command. The following table lists and describes the parameters required by the Connect command.

Parameter

Description

host

The host to which you want to connect.

Note: This value must be lowercase.

port

The port number on which the Telnet Server listens. The default port is 23.

emulation

The terminal (term) type: Tn3270 or Tn5250.

The following two examples show how to establish a Telnet connection.



Example: Establishing a Telnet Connection With a Hyperlink

You can establish a Telnet connection by adding the following code to an HTML page (3270 is used in this example):

<a href=TelnetServlet?cmd=connect&host=ibivm&emulation=tn3270>IBI VM</a>

Top of page

Example: Establishing a Telnet Connection With an HTML Form

To establish a Telnet connection with an HTML form:

  1. Enter the following in a text editor and save as sample1.html in your \ibitelnet.war directory (3270 is used in this example):
    <html>
    <body>
    <a href=TelnetServlet?cmd=connect&host=vmhost&emulation=tn3270>MY VM 
    Machine</a>
    <br>
    <a href=TelnetServlet?cmd=connect&host=mvshost&emulation=tn3270>
    MY MVS Machine
    </a>
    <br>
    <a href=TelnetServlet?cmd=connect&host=as400host&emulation=tn3270>
    MY As/400 Machine
    </a>
    </body>
    </html>
  2. Start your web server.
  3. Run the sample1.html file from the browser by entering the following URL:
    http://localhost:8081/ibitelnet/sample1.html

The Welcome window opens with options for various mainframe applications, as shown in the following example.


iWay Software