Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
4.96 Mб

Embedding PL/SQL Code in Web Pages (PL/SQL Server Pages)

Writing the Code and Content for the PL/SQL Server Page

Loading the PL/SQL Server Page into the Database as a Stored Procedure

Choosing a Software Configuration

To develop and deploy PL/SQL Server Pages, you need Oracle Database version 8.1.6 or later, together with the mod_plsql plug-in of Oracle HTTP Server (OHS).

Choosing Between PSP and the PL/SQL Web Toolkit

You can produce the same results in different ways:

By writing an HTML page with embedded PL/SQL code and compiling it as a PL/SQL server page. You may call procedures from the PL/SQL Web Toolkit, but not to generate every line of HTML output.

By writing a complete stored procedure that produces HTML by calling the HTP and OWA_* packages in the PL/SQL Web Toolkit.

The key factors in choosing between these techniques are:

What source are you using as a starting point?

If you have a large body of HTML, and want to include dynamic content or make it the front end of a database application, use PSP.

If you have a large body of PL/SQL code that produces formatted output, you may find it more convenient to produce HTML tags by changing your print statements to call the HTP package of the PL/SQL Web Toolkit.

What is the fastest and most convenient authoring environment for your group?

If most work is done using HTML authoring tools, use PSP.

If you use authoring tools that produce PL/SQL code, such as the page-building wizards in Oracle Application Server Portal, then it might be less convenient to use PSP.

How PSP Relates to Other Scripting Solutions

Because any kind of tags can be passed unchanged to the browser through a PL/SQL server page, you can include JavaScript or other client-side script code in a PL/SQL server page.

You cannot mix PL/SQL server pages with other server-side script features, such as server-side includes. In many cases, you can get the same results by using the corresponding PSP features.

13-20 Oracle Database Application Developer's Guide - Fundamentals

Соседние файлы в папке Oracle 10g