Processing Client Requests Database Access Descriptors DADs

3-2 Oracle Fusion Middleware Users Guide for mod_plsql ■ File Upload and Download ■ Path Aliasing Direct Access URLs ■ Common Gateway Interface CGI Environment Variables ■ Using Caching with PLSQL Based Web Applications ■ Performance Tuning Areas for mod_plsql ■ Restrictions in mod_plsql

3.1 Processing Client Requests

mod_plsql is an Oracle HTTP Server plug-in that communicates with the database. It maps browser requests into database stored procedure calls over a SQLNet connection. It is often indicated by a pls virtual path. The following scenario Figure 3–1 provides an overview of what steps occur when a server receives a client request: Figure 3–1 Overview of the Process When a Server Receives a Client Request The image illustrates the steps that occur when a server receives a client request. 1. The Oracle HTTP Server receives a request containing a virtual path, which is configured to be serviced by mod_plsql. 2. The Oracle HTTP Server routes the request to mod_plsql. 3. By using the configuration information stored in your DAD, mod_plsql connects to the database. The request is forwarded by mod_plsql to the Oracle Database. Understanding mod_plsql 3-3 4. mod_plsql prepares the call parameters, and invokes the PLSQL procedure in the application. 5. The PLSQL procedure generates an HTML page using data and the PLSQL Web Toolkit accessed from the database. 6. The response is returned to mod_plsql. 7. The Oracle HTTP Server sends the response to the client browser. The procedure that mod_plsql invokes returns the HTTP response to the client. To simplify this task, mod_plsql includes the PLSQL Web Toolkit, which contains a set of packages called the owa packages. Use these packages in your stored procedure to get information about the request, construct HTML tags, and return header information to the client. Install the toolkit in a common schema so that all users can access it.

3.2 Database Access Descriptors DADs

Each mod_plsql request is associated with a Database Access Descriptor DAD, a set of configuration values used for database access. A DAD specifies information such as: ■ the database alias Oracle Net service name. ■ a connect string, if the database is remote. ■ a procedure for uploading and downloading documents. You can also specify username and password information in a DAD. If they are not specified, the user is prompted to enter a username and password when the URL is invoked.

3.3 Invoking mod_plsql