Chapter 6 Web Server Gateways


Usage requirements

Reading the index.html file

Use your Web browser to view the index.html file in your jConnect installation directory. index.html provides links to the jConnect documentation and sample code.

Note   If you use Netscape on the same machine where you have installed jConnect, make sure that your browser does not have access to your CLASSPATH environment variable. See "Restrictions on Setting CLASSPATH When You Use Netscape" in Chapter 3 of the Sybase jConnect for JDBC Installation Guide and Release Bulletin.

  1. Open your Web browser.
  2. Enter the URL that matches your setup. For example, if your browser and the Web server are running on the same host, enter:
    http://localhost:8000/index.html
    


    If the browser and the Web server are running on different hosts, enter:
    http://host:port/index.html
    


    where host is the name of the host on which the Web server is running, and port is the listening port.

Running the sample Isql applet

After loading the index.html file in your browser:

  1. Click "Run Sample JDBC Applets."

    This takes you to the jConnect Sample Programs page.
  2. Move down the Sample Programs page to find the table under "Executable Samples."
  3. Locate "Isql.java" in the table and click Run at the end of the row.

The sample Isql.java applet prompts for a simple query on a sample database and displays the results. The applet displays a default Adaptive Server host name, port number, user name (guest), password (sybase), database, and query. Using the default values, the applet connects to the Sybase demonstration database. It returns results after you click Go.

Troubleshooting

Under UNIX, if the applet does not appear as expected, you can modify the applet screen dimensions:

  1. Use a text editor to edit the following:

    For jConnect 4.x

    $JDBC_HOME/sample/gateway.html

    For jConnect 5.x

    $JDBC_HOME/sample2/gateway.html
  2. Change the height parameter in line 7 to 650. You can experiment with different height settings.
  3. Reload the Web page on your browser.

 


Copyright © 2001 Sybase, Inc. All rights reserved.