hi,
Oracle8.1.7 on Windows2000 is an Oracle Certified Web enabled platform.
OVERVIEW
Oracle8i has integrated a Java Virtual Machine (JVM), a Java dB Connectivity (JDBC) driver, and an Object Request Broker (ORB) directly into the database engine. This new infrastructure allows you to easily develop dynamic db-driven intranet and Web apps using 2 different programming models: stored procedures and component-based modeling.
a. Stored procedures can be written in Java or PL/SQL. Java programs can access data via JDBC or SQLJ (e.g. embedded SQL in Java, very simle). Java stored programs reap performance benefits from an embedded native compiler and the tight integration of the JVM w/ db.
b. Component-based prgms can be written using 2 models. Common Object Request Broker Architecture (CORBA) is a standard way of building distributed apps. Enterprise Java Beans (EJB) is the server-side component model for Java.
IMPLEMENTAION QUESTIONS:
1)I have installed Oracle 8i enterprise version on windows 2000 server.
- this config is Oracle Certified
2)I created a database during installation.
- good
3)I tried to create a web page and connect to this database using the Web Publishing Assistant -
But the web page was not generated.
Qa. Is the OracleHTTPService on Win2000 running -
Qb. Which "Web Publishing Assistant" are you referring to-
Qc. what type of Web Page are you creating w/ Oracle, you have a myriad of choices: PL/SQL Pages(PSP), JSP, JAVA stored procedures...
this doc may be of use, it's an intro to writing PSP:
***This document aims to introduce Oracle developers to the concepts
of PL/SQL Server Pages, and write the first Internet based PL/SQL
procedure.
SCOPE & APPLICATION
-------------------
For users who are developing dynamic Internet sites based on Oracle
technology.
What are PL/SQL Server Pages? (PSPs)
--------------------------
A PL/SQL Server Page is a dynamic, database driven page of Internet
content built mainly in the easy to write HTML language, with dynamic
pieces on Oracle content specified in scriptlet tags similar to those
used in JavaServer Pages.
PSPs are based on technology first introduced in Oracle Application
Server which is now the platform for Oracle's Enterprise Portal offering
Oracle Portal. This technology known as the PL/SQL Web Toolkit is
shipped pre-installed in the database, so no additional packages need
to be loaded.
By writing an HTML page with embeded PL/SQL code and compiling it as a
PL/SQL Server Page, you may call procedures from the PL/SQL Web Toolkit,
but are not required to generate every line of HTML output.
Building a PSP.
The first requirement is a PL/SQL Gateway through a Web Listener.
Typically this is Oracle Portal or Apache with the mod_plsql module,
pre-configured with Oracle 8.1.7 or Internet Application Server (iAS).
Once this is established, you will have a virtual path, typically
http://servername/DAD_name
that you can access the database with. The name of your PSP will
form the procedure name.
Using basic HTML and with a page directive and procedure directive
we construct the page.
<%@ page language="PL/SQL" %>
<%@ plsql procedure="first" %>
<HTML>
<HEAD><TITLE>This is a PSP Page!</TITLE></HEAD>
<BODY>
This is a list of employees: <BR>
<% for emp in (select * from emp order by ename) loop %>
Employee ID = <%= emp.empno %>.
Employee Name = <%= emp.ename %><BR>
<% end loop; %>
</BODY>
</HTML>
This will scroll through the list of employees in the emp table,
outputting to a browser the employee ID and employee name. Notice
that any PL/SQL call can be made in a PSP page given the executing
user's correct credentials.
We now use the loadpsp command to place the PSP inside the database.
The syntax for loadpsp is as follows:
usage: loadpsp [-replace] -user <logon> [<page1> <page2> ...]
where <logon> ::= <username>/<password>[@<co
-replace will replace this procedure with any existing procedures of
the same name, regardless of compilation outcome. That is if this
procedure fails to compile correctly there will be an invalid procedure
in the schema, therefore errors will be returned to the user when
accessing that URL. This argument must be used when an object of the
same name already exists in the target schema.
-user is the username and password with any connect string.
<page1..n> are the files that contain procedures.
There is currently no way to combine these procedures in a single
package inside the database.
D:\Oracle>loadpsp -replace -user scott/tiger@orcl.world first.psp
Should return
"first.psp": procedure "first" created.
The final step is to load the PSP in the browser. My DAD is called
SCOTT_ORCL
so my URL is
http://multra2.au.oracle.c
And the output should be
This is a list of employees:
Employee ID = 7876. Employee Name = ADAMS
Employee ID = 7499. Employee Name = ALLEN
Employee ID = 7698. Employee Name = BLAKE
Employee ID = 7782. Employee Name = CLARK
Employee ID = 7902. Employee Name = FORD
Employee ID = 7900. Employee Name = JAMES
Employee ID = 7566. Employee Name = JONES
Employee ID = 7839. Employee Name = KING
Employee ID = 7654. Employee Name = MARTIN
Employee ID = 7934. Employee Name = MILLER
Employee ID = 7788. Employee Name = SCOTT
Employee ID = 7369. Employee Name = SMITH
Employee ID = 7844. Employee Name = TURNER
Employee ID = 7521. Employee Name = WARD
If you do not get the expected result the first debugging step is
to check that the procedure is in fact VALID inside the SCOTT
schema. The following SQL will assist you with this
select object_name, object_type, status from user_objects where
object_name like 'F%';
The output you get should look something like
OBJECT_NAME OBJECT_TYPE STATUS
--------------------------
FIRST PROCEDURE VALID
If the procedure is INVALID, then go back and check the syntax for
your PSP. A common mistake is to leave of the '=' in a directive.
This will disrupt the conversion of your PSP to a procedure. If the
object does not exist at all in the schema, ensure that the correct
permissions are available (connect, resource), and that your loadpsp
command was in fact directed at the correct database.
RELATED DOCUMENTS
-----------------
Oracle8i Application Developer's Guide - Fundamentals
Chapter 15: Developing Web Applications with PL/SQL
*********************
I think it is due to the fact that the created database does not have any contents to run a query on.
* You may not have configured the OracleHTTPService on windows2000, below are the key concepts/files
1. $ORACLE_HOME/apache/modpls
2. $ORACLE_HOME/apache/modpls
wdbsvr.app - defines DAD, Database Access Description, it describes the oracle user/password, connect-string (tnsnames.ora), and HTML file location.
3. $ORACLE_HOME/apache/apache
4. $ORACLE_HOME/apache/apache
5. $ORACLE_HOME/apache/apache
6. $ORACLE_HOME/apache/apache
7. enable browser cookies
8. windows2000 environment variable: WV_GATEWAY_CFG=
$ORACLE_HOME/apache/apache
9. test by invoking Web browser, enter: http:[server_name]
it should bring up the ORACLEHTTPService demo page that introduces you to the various Web Modules: OSE,JSP,PSP, etc..
see ya,
Eric
4)I used the Database configuration assistant and created a new database but the same results again.....so
i dint get anywhere.
- see above
5)I created a new table using SQL and populated it but then i have no idea how to connect it to the
web page.
- see above
Main Topics
Browse All Topics





by: schwertnerPosted on 2001-06-10 at 23:21:19ID: 6175973
To connect to Oracle DB via WEB you have to install the middletier - the WEB server. It can be OAS9i or other. You also have to think how to construct the WEB pages. There are many techniques - JSP, JDeveloper, PSP etc. Also Oracle Forms and Reports can be done (if you know to use them).