Oracle Web Publishing Assistant Getting Started for Windows NT
Release 1.0
A53270_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 Tutorial

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.

Using the Generated Default Template

The first tutorial uses the default generated template WEB.HTX. This template is a simple page, merging information retrieved from one table. The 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 WEB.HTX.

To create the web page:

  1. Start Oracle Web Publishing Assistant.
  2. From the taskbar, select 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, de-select the checkbox.

  3. Click Next. The Oracle Web Publishing Assistant appears:
  4. Click New.
  5. The Create Web Page Wizard appears (Step 1 of 4).

    1. Enter database login information, and click Next:
    2. 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 next screen (Step 2 of 4) appears.

    3. Select the Build a Query from a Database Hierarchy method for creating a query.
    4. Click Local Database> SCOTT > TABLE , and select EMP:
    5. Click Next:
    6. The next screen (Step 3 of 4) appears.

    7. Select the Once scheduling option.
    8. Select any day and any time in the future to generate the web page.

      The next screen (Step 4 of 4) appears.

    9. Accept the default file name as the file name of the web page (WEB.HTM).
    10. Select Generate Default Template File.

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

      Note:

      All web pages are automatically generated at this time, even if you chose a scheduling option other than Immediately. Your web page will be re-generated at the specified time.  

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

Using the EXAMPLE2.HTX Tutorial

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.
  2. From the taskbar, select 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, de-select the checkbox.

  3. Click Next.
  4. The Oracle Web Publishing Assistant appears:

  5. Click New.
  6. The Create Web Page Wizard appears (Step 1 of 4).

  7. Enter database login information, and click Next:
  8. 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 next screen (Step 2 of 4) appears.

  9. Select the Enter a SQL Statement method for creating a query.
  10. You will now use a predefined SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file.

    1. Start Notepad.
    2. From the taskbar, select Start > Run.

    3. Enter NOTEPAD, and click OK.
    4. Notepad opens.

    5. Choose Open from the File menu, . Navigate to ORANT\OWAST\SAMPLES\EXAMPLE2.SQL.
    6. The file EXAMPLE2.SQL appears.

    7. Choose Select All from the Edit menu.
    8. Choose Copy from the Edit menu.
    9. Choose Exit to exit Notepad.
  11. Choose Paste from the Edit menu, and paste the SQL script into the field.
  12. Click Next:
  13. The next screen (Step 3 of 4) appears.

  14. Select the Once scheduling option.
  15. Select any day and any time in the future to generate the web page.

    The next screen (Step 4 of 4) appears.

  16. Enter EXAMPLE2.HTM as the file name of the web page.
  17. Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\EXAMPLE2.HTX.

    Note:

    All web pages are automatically generated at this time, even if you chose a scheduling option other than Immediately. Your web page will be re-generated at the specified time.  

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

    The resulting web page (.HTM) looks like this:

Using the EXAMPLE3.HTX Tutorial

The third tutorial uses a template which incorporates the use of frames, enabling you to merge two separate query statements into one file. This 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 EXAMPLE3.HTX and DETAIL.HTX.

To create the web page:

  1. Start Oracle Web Publishing Assistant.
  2. From the taskbar, select 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, de-select the checkbox.

  3. Click Next.
  4. The Oracle Web Publishing Assistant appears:

  5. Click New.
  6. The Create Web Page Wizard appears (Step 1 of 4).

  7. Enter database login information, and click Next:
  8. 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 next screen (Step 2 of 4) appears.

  9. Select the Enter a SQL Statement method for creating a query.
  10. Use the predefined SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file EXAMPLE3.SQL.

    1. Start Notepad.
    2. From the taskbar, select Start > Run.

    3. Enter NOTEPAD, and click OK.
    4. Notepad opens.

    5. Choose Open from the File menu, . Navigate to ORANT\OWAST\SAMPLES\EXAMPLE3.SQL.
    6. The file EXAMPLE3.SQL appears.

    7. Choose Select All from the Edit menu.
    8. Choose Copy from the Edit menu.
    9. Choose Exit to exit Notepad.
  11. Choose Paste from the Edit menu, and paste the SQL script into the field.
  12. The next screen (Step 3 of 4) appears.

  13. Select the Once scheduling option.
  14. Select any day and any time in the future to generate the web page.

    The next screen (Step 4 of 4) appears.

  15. Enter MAIN.HTM as the file name of the web page.
  16. Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\EXAMPLE3.HTX.

    Note:

    All web pages are automatically generated at this time, even if you chose a scheduling option other than Immediately. Your web page will be re-generated at the specified time.  

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

    The resulting web page (.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). After you complete the next section, the result will be a file EXAMPLE3.HTM which incorporates MAIN.HTM and EMP#.HTM (where EMP# is the employee number).

    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 create the second part of the web page:

  19. Repeat Step 3.
  20. Repeat Step 4.
  21. Select the Enter a SQL Statement method for creating a query.
  22. Use the predefined SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file EXAMPLE3.SQL. For more information on how to use the script, see Step 5.

  23. Add the following clause to the SQL statement in the field:
  24. ...and empno=emp#...
    

    so that the entire 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.

  25. Click Next.
  26. Enter 7839.HTM as the file name for the first employee record for employee KING.
  27. Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\DETAIL.HTX.

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

  30. Open the resulting web page EXAMPLE3.HTM (located in ORANT\OWAST\SAMPLES directory) in your web browser. The page looks like this:
  31. Repeat Steps 10 through 16 for each frame you want to create.
  32. 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