582 IBM WebSphere Host Publisher Version 3.5
5. Formats the XML data as HTML output using an XSL stylesheet and an XSL
processor. This output is returned to the browser.
The HTML output returned to the browser shows how the window displays on a
traditional terminal. The user can input data directly onto the HTML host window.
The user can move the cursor to the input fields using the mouse or the Tab key.
The traditional terminal function keys are presented to the user as buttons in the
browser window. The user can select the buttons by using the mouse or using
the Tab key and pressing the Enter key on the keyboard.
Two additional buttons are presented on the user's browser page: Refresh and
Disconnect. The Refresh button updates the browser's host window to the
current state of the host session, ignoring possible input. The Disconnect button
terminates the current host session. Disconnection enables an efficient use of
Host Publisher resources. The user should disconnect the host session when
interaction with the host application is no longer needed.
While the servlet is a useful application, it is an example of how to interact with
Host Publisher to encapsulate host data in XML format. The servlet could be
changed to interact with the host application using XML processing techniques,
in an automated fashion, presenting the user with a specific subset of information
obtained from the host.
The data can also be rendered in different formats by using a different XSL
stylesheet when processing the data. The servlet can be changed to render the
data in a format that matches the output preference of the user or the user's
access device. The servlet can do this at run time by specifying the XSL
stylesheet used for this particular instance of the servlet.
To facilitate the writing of Host Publisher XML Legacy Gateway servlets, the
source code for the xmlLegacyGateway servlet is included with Host Publisher.
HTML documentation is also included. The source code and all documentation
can be accessed starting with the following file:
install_dir\SDK\XLGW\Introduction.html
where install_dir is the directory in which Host Publisher is installed.
In summary, the xmlLegacyGateway servlet provides a detailed sample of how to
interface with host applications using the xmlAppData Bean. It implements basic
TN3270 and TN5250 HTML-to-Host Emulation by using about 90% of the XML
gateway application interface.
Note: The sample XML Legacy Gateway Administration is located in the
<HostPub>\SDK\XLGW\Servlet\xmlLegacyGatewayServletSample.