Re: WOW Questions
Date: 1995/09/07
Message-ID: <42naof$nuc_at_inet-nntp-gw-1.us.oracle.com>#1/1
liou_at_synapse.bms.com (C. Liou) wrote:
>I am trying to display data in Oracle on a WWW page.
>I checked //www.oracle.com but did not find the answers I need.
>What I have now:
> WOW kit installed on the Unix server.
> HTML scripts.
> Package procedures to access oracle data(and to pass result to
> the page?.)
>
>My questions are:
>1. Should the package procedures be 'loaded' into the database, or should it
>sit in some file directory? How then are these procedures referenced in the
>HTML scripts?
Yes, that's the whole point. They are referenced by passing them as
extra PATH_INFO after the URL pointing to the wowstub CGI program.
If you want to reference the stored procedure "foo", it would look
like this: http://your.host/cgi-bin/wow/foo
>2. Where is the link between the HTML page and the package procedure? How
>does the HTML script know what procedure to execute and where to find it?
The URL is part of a hypertext link or an html form action. Both POST
and GET methods are supported.
>3. There are some 'htp.*' functions in the procedure. What are they and where
>can I read more about those functions?
Sorry, but you'll have to read the source code ;^)
Basically anything you want to appear on the html "output" from a
stored procedure must go through htp.print('...'). All the htf
functions are really optional, they only simplify html coding a bit by
providing a function based api to html. Instead of doing
htp.print('<b>Some bold text</b>') you may do htp.print(htf.bold('Some
bold text')). Shortcuts for htp.print(htf...) are also available:
htp.bold('Some bold text') is equivalent to the previous example.
>4. How to specify 'ACTION' in the HTML script?
The action attribute of the FORM element specifies what CGI program to
request when the form is submitted. For example:
<form action="/cgi-bin/wow/foo"> <input type="text" name="bar"> <input type="submit"></form>
will launch the wow program (wowstub), which in turn will demangle the parameter "bar" and invoke the stored procedure "foo" with one parameter named "bar".
>5. From the HTML script, how to pass parameters to the package procedure?
This is done automatically by wow. Your input objects in an html form
must have the same names as the parameters to your stored procedure.
They do not have to appear in the same order.
>6. Does 'wowstub' need any parameters?
No. Parameters are extracted from the QUERY_STRING environment
variable when using the GET method and read from stdin when using the
POST method.
>Your help will be appreciated!
>---Chunyi
>______________________________________________________________________________
> Chunyi Liou MS: D14-04 Tel : (609) 252-5134
> Scientific Info. Systems P.O. Box 4000 Fax : (609) 252-5747
> Bristol-Myers Squibb Co. Princeton, NJ 08543 email: liou_at_synapse.bms.com
>______________________________________________________________________________
-- Magnus Lonnroth Senior Product Manager Internet Products, Server Technologies Oracle Corp.Received on Thu Sep 07 1995 - 00:00:00 CEST