Oracle Web Publishing Assistant Getting Started
Release 2.0 for Windows NT

A55738-01

Library

Product

Contents

Index

Prev Next

4
Using the Tutorials

This chapter discusses how to use the three tutorials included with Oracle Web Publishing Assistant.

Specific topics discussed are:

About the Tutorials

Each tutorial in this chapter uses increasingly more complex templates to format retrieved database information. To learn how the different effects are achieved, view the template structure in an HTML editor or view the source code from within your browser.

Tutorial 1: Using the Generated Default Template

The first tutorial uses the default template. This template is a simple page, which will display information retrieved from one table using a Java applet. The database query used in the tutorial retrieves information from the SCOTT.EMP table (installed automatically when you install Oracle8 using the Typical Installation option).

Oracle Web Publishing Assistant merges the results of the database query with the template. The result is a web page query. All of your scheduled web page queries are listed in the Oracle Web Publishing Assistant file listing.

To create the web page:

  1. Start Oracle Web Publishing Assistant.

    From the taskbar, choose Start > Programs > Oracle for Windows NT > Oracle Web Publishing Assistant.

    Oracle Web Publishing Assistant appears. If you have never created a web page query using the Create Web Page Wizard before or if you do not have any web page queries scheduled in the listing, then the welcome screen appears with a Create Web Page button. To bypass the welcome screen upon subsequent use of Oracle Web Publishing Assistant, clear the check box on the screen.

  1. Click Create Web Page, or click New on the toolbar.

    The screen Create Web Page Wizard - Step 1 of 4 appears:

  1. Enter database login information, and click Next:

Field   Description  

User Name  

Enter the user SCOTT.  

Password  

Enter the password TIGER.  

Database  

Leave the field blank to connect to the local database.  

The screen Create Web Page Wizard - Step 2 of 4 appears.

  1. Select the Build a Query from a Database Hierarchy method for creating a query.

  2. Click Local Database, and navigate to SCOTT > TABLE > EMP:

  1. Select EMP, and click Next.

    The screen Create Web Page Wizard - Step 3 of 4 appears.

  2. Select the Once scheduling option.

    Select any day and any time in the future to generate the web page:

  1. Click Next.

    The screen Create Web Page Wizard - Step 4 of 4 appears:

  1. Accept the default file name of the web page (WEB.HTM).

    Select Generate Default Template File.

  2. Click Finish.

    The Summary Screen appears, confirming that web page creation was successful. Click OK to dismiss the screen.


    Note:

    All web pages, except those scheduled to be created Manually, are automatically generated at this time. If you specified a scheduling option for some time in the future, your web page will also be regenerated at that scheduled time.

     

    The resulting web page (the default file name is WEB.HTM) looks like this:

Tutorial 2: Using the EXAMPLE2.HTX Template

The second tutorial queries the SCOTT.EMP table (installed automatically when you install Oracle8 using the Typical Installation Option) and formats the retrieved information using the template EXAMPLE2.HTX.

To create the web page using the template EXAMPLE2.HTX:

  1. Start Oracle Web Publishing Assistant.

    From the taskbar, choose Start > Programs > Oracle for Windows NT > Oracle Web Publishing Assistant.

    Oracle Web Publishing Assistant appears. To bypass the welcome screen upon subsequent use of Oracle Web Publishing Assistant, clear the check box.

  1. Click Next.

    The Oracle Web Publishing Assistant appears:

  1. Click New.

    The screen Create Web Page Wizard - Step 1 of 4 appears:

  1. Enter database login information, and click Next:

Field   Description  

User Name  

Enter the user SCOTT.  

Password  

Enter the password TIGER.  

Database  

Leave the field blank to connect to the local database.  

The screen Create Web Page Wizard - Step 2 of 4 appears.

  1. Select the Enter a SQL Statement method for creating a query, and click Import SQL from Text File.

    Use the provided SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file located in the directory ORANT\OWAST\SAMPLES.

  2. Select EXAMPLE2.SQL, and click Open.

    The SQL script appears in the field:

  1. Click Next.

    The screen Create Web Page Wizard - Step 3 of 4 appears:

  1. Select the Once scheduling option.

  2. Select any day and any time in the future to generate the web page.

    The screen Create Web Page Wizard - Step 4 of 4 appears.

  3. Enter EXAMPLE2.HTM as the file name of the web page.

  4. Select Use Template File, and navigate to ORANT\OWAST\SAMPLES\EXAMPLE2.HTX:

  1. Click Finish.

    The Summary Screen appears, confirming that web page creation was successful. Click OK to dismiss the screen.

    The resulting web page EXAMPLE2.HTM looks like this:

Tutorial 3: Using the EXAMPLE3.HTX Template

The third tutorial is based on a template which uses frames, enabling you to merge two separate query statements into one web page. This tutorial queries the SCOTT.EMP table (installed automatically when you install Oracle8 Enterprise Edition or Oracle8 using the Typical Installation Option) and formats the retrieved information using the templates EXAMPLE3.HTX and DETAIL.HTX.

To create the web page:

  1. Start Oracle Web Publishing Assistant.

    From the taskbar, choose Start > Programs > Oracle for Windows NT > Oracle Web Publishing Assistant.

    Oracle Web Publishing Assistant appears. To bypass the welcome screen upon subsequent use of Oracle Web Publishing Assistant, clear the checkbox.

  1. Click Next.

    The Oracle Web Publishing Assistant appears:

  1. Click New.

    The screen Create Web Page Wizard - Step 1 of 4 appears:

  1. Enter database login information, and click Next:

Field   Description  

User Name  

Enter the user SCOTT.  

Password  

Enter the password TIGER.  

Database  

Leave the field blank to connect to the local database.  

The screen Create Web Page Wizard - Step 2 of 4 appears.

  1. Select the Enter a SQL Statement method for creating a query, and click Import SQL From Text File.

    Use the provided SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file located in the directory ORANT\OWAST\SAMPLES.

  2. Select EXAMPLE3.SQL, and click Open.

    The SQL script appears in the field:

  1. Click Next.

    The screen Create Web Page Wizard - Step 3 of 4 appears.

  2. Select the Once scheduling option.

    Select any day and any time in the future to generate the web page:

  1. Click Next.

    The screen Create Web Page Wizard - Step 4 of 4 appears:

  1. Enter MAIN.HTM as the file name of the web page.

    Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\EXAMPLE3.HTX.

  2. Click Next.

    The Summary Screen appears, confirming that web page creation was successful. Click Finish to dismiss the screen.

    The resulting web page MAIN.HTM looks like this:

    The web page you have created thus far is similar to the web page in the second tutorial, except that the employee names are hot (linked).

    The next section explains how you can further develop the page by incorporating a frame which shows a set of information from a separate query on the same web page. In this example, you will create a frame which shows the details of each employee listed in the first column of the web page when the name of that employee is clicked.

    Note that when you pass the mouse pointer over the employee name, an HTML file is linked to the name. The file each employee name points to is what you will be creating in the next section (EMP#.HTM, where EMP# is the employee number). After you complete the next section, the result will be a file EXAMPLE3.HTM which incorporates the files MAIN.HTM and EMP#.HTM.

    To illustrate, the first employee listed is KING. The employee number associated with KING is 7839. In order to create the frame of information, you must know the employee number of each employee. This example will stop with employee KING, but you can create as many as you want.

To continue with Tutorial 3 and create the second part of the web page:

  1. Repeat Step 3.

  2. Repeat Step 4.

  3. Select the Enter a SQL Statement method for creating a query, and click Import SQL From Text File.

    Use the predefined SQL script EXAMPLE3A.SQL to enter the SQL statement. For more information on how to use the script, see Step 5.

    The statement reads:

    select empno,ename,job,sal,comm,hiredate,dname from emp a, dept b where 
    a.deptno = b.deptno and empno=emp# order by sal desc;
    

    where emp# is the employee number.

  4. Click Next.

  5. Enter 7839.HTM as the file name for the first employee record for employee KING.

    Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\DETAIL.HTX.

  6. Click Next.

    The Summary Screen appears, confirming that the web page creation was successful. Click Finish to dismiss the screen.

  7. Open the resulting web page EXAMPLE3.HTM (located in ORANT\OWAST\SAMPLES directory) in your web browser. The page looks like this:

  1. Repeat Steps 10 through 16 for each frame you want to create.

    Note that only the files MAIN.HTM and EMP#.HTM appear in the file listing. The file EXAMPLE3.HTM will not appear in the file listing of Oracle Web Publishing Assistant:

    When you are finished creating the frames, your resulting web page will allow a user to see the Employee Details of each of the employees by clicking on the employee name. The information contained in the frame shows the information relevant to the selected name.




Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index