Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01


Solution Area



Go to previous page Go to beginning of chapter Go to next page

XDK for Java: Specifications and Cheat Sheets, 13 of 15

Installing Oracle XSQL Servlet

Downloading and Installing XSQL Servlet

Downloading XSQL Servlet from Oracle Technet

You can download XSQL Servlet distribution from:

  1. Click on the 'Software' icon at the top of the page:

  2. Log in with your OTN username and password (registration is free if you do not already have an account).

  3. Selecting whether you want the NT or Unix download (both contain the same files)

  4. Acknowledge the licensing agreement and download survey

  5. Clicking on xsqlservlet_v0_9_9_1.tar.gz or

Extracting the Files in the Distribution

To extract the contents of XSQL Servlet distribution, do the following:

  1. Choose a directory under which you would like the .\xsql directory and subdirectories to go, for example, C:\

  2. Change directory to C:\, then extract the XSQL downloaded archive file there. For example:


        tar xvfz xsqlservlet_v0_9_9_1.tar.gz

    Windows NT:

        pkzip25 -extract -directories

    using the pkzip25 command-line tool or the WinZip visual archive extraction tool.

Windows NT: Starting the Web-to-go Server

XSQL Servlet comes bundled with the Oracle Web-to-go server that is pre-configured to use XSQL Pages. The Web-to-go web server is a single-user server, supporting the Servlet 2.1 API, used for mobile application deployment and for development. This is a great way to try XSQL Pages out on your Windows machine before delving into the details of configuring another Servlet Engine to run XSQL Pages.


The Web-to-go Web server is part of Oracle's development and deployment platform for mobile applications. For more information on Web-to-go, see 

Windows NT users can get started quickly with XSQL Pages by following these steps:

  1. Running the xsql-wtg.bat script in the .\xsql directory.

  2. Browsing the URL http://localhost:7070/xsql/index.html

If you get an error starting this script, edit the xsql-wtg.bat file to properly set the two environment variables JAVA and XSQL_HOME to appropriate values for your machine.

    REM ----------------------------------------------
    REM Set the 'JAVA' variable equal to the full path
    REM of your Java executable.
    REM ----------------------------------------------
    set JAVA=J:\java1.2\jre\bin\java.exe
    set XSQL_HOME=C:\xsql
    REM ----------------------------------------------
    REM Set the 'XSQL_HOME' variable equal to the full
    REM path of where you install the XSQL Servlet 
    REM distribution.
    REM ----------------------------------------------

Then, repeat the two steps above.

If you get an error connecting to the database when you try the demos, you'll need to go on to the next section, then try the steps above again after setting up your database connection information correctly in the XSQLConfig.xml file.

Setting Up the Database Connection Definitions for Your Environment

The demos are set up to use the SCOTT schema on a database on your local machine (i.e. the machine where the web server is running). If you are running a local database and have a SCOTT account whose password is TIGER, then you are all set. Otherwise, you need to edit the .\xsql\lib\XSQLConfig.xml file to correspond to your appropriate values for username, password, dburl, and driver values for the connection named "demo".

    <?xml version="1.0" ?>
        <connection name="demo">
        <connection name="lite">

UNIX: Setting Up Your Servlet Engine to Run XSQL Pages

Unix users and any user wanting to install the XSQL Servlet on other web servers should continue with the instructions below depending on the web server you're trying to use. In every case, there are 3 basic steps:

Include the list of XSQL Java archives as well as the directory where XSQLConfig.xml resides (by default ./xsql/lib) in the server CLASSPATH

Note :

For convenience, the xsqlservlet_v0_9_9_1.tar.gz and xsqlservlet_v0_9_9_1.zipdistributions include the .jar files for the Oracle XML Parser for Java (V2), the Oracle XML SQL Utilities for Java, and the 8.1.6 JDBC driver in the .\lib subdirectory, along with Oracle XSQL Pages' own .jar archive.

  1. Map the .xsql file extension to the oracle.xml.xsql.XSQLServlet servlet class

  2. Map a virtual directory /xsql to the directory where you extracted the XSQL files (to access the on-line help and demos)

Go to previous page Go to beginning of chapter Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.


Solution Area