Re: Problem: Forming URL for Web Server 1.0

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1997/02/12
Message-ID: <330121f0.2192893_at_nntp.mediasoft.net>#1/1


On 11 Feb 1997 11:30:56 GMT, "Abteilung AI" <bruhn_at_wu-wien.ac.at> wrote:

>Hi,
>
>this is probably a stupid question, but I cannot make out how to form a
>proper URL to access stored procedures on Web Server 1.0 and Oracle 7.3.2
>
>I thought an URL to access a stored procedure was formed like:
>http://<server-name>/<virtual path>/<web agent service>/owa/<procedure>
>

That is correct but maybe more clear as:

http://<server-name>/<OPTIONAL part of virtual path>/<web agent service part of virtual path>/owa/<procedure>

>So I have installed the demo application hr. I have used a virtual path
>called hr and a new web agent service called hr. Everything works fine with
>the following URL:
>http://miss:8889/hr/owa/hr.tree

In this one, miss:8889 ids the server,
/hr is the web agent service (no virtual path needed nor supplied in this case) owa is the owa executable found in $ORACLE_HOME/ows/bin hr.tree is the procedure to run.

>So what is hr here? The virtual path? The web agent-service?

both.

In webserver 1, owa is a cgi executable located in $ORACLE_HOME/ows/bin. It uses standard cgi environment variable to figure out what to do. For example, given the following URL:

http://myhost/foo/bar/hr/owa/hr.tree

and the following virtual directory mapping:

/foo/bar/hr -> $ORACLE_HOME/ows/bin

You would find that the following environment variables are set:

PATH_INFO=/hr.tree
SCRIPT_NAME=/foo/bar/hr/owa
PATH_TRANSLATED=$ORACLE_HOME/ows/bin/owa

Path_info is used to figure out what procedure to run.

Script_name is used to find the web agent name (it looks at script name and works backwards through it to find the string in front of /owa. thats the web agent name)

Path_translated is the actual name of the program the web server ran.

If, on the other hand, you had:

http://myhost/hr/owa/hr.tree

and mappings

/hr -> $ORACLE_HOME/ows/bin

you would find:

PATH_INFO=/hr.tree
SCRIPT_NAME=/hr/owa
PATH_TRANSLATED=$ORACLE_HOME/ows/bin/owa

Again, apply the same rules to parsing the environment and you end up with the same procedure and web agent.

>
>Then I have tried to rename the web agent service from hr to hrnew (and
>restarted the listener). I could not find any URL to access the data.
>Either the listener reported "URL unknown" or the web agent service
>returned "Service not available, try again later".
>

To do this you would need to

  • create a web agent named hrnew OR have an owa_default_service web agent
  • map a directory such that the virtual directory is /hrnew and the physical path is $ORACLE_HOME/ows/bin

Then, restart the listener....

>Then I have tried to rename the virtual path to hrnew and the web agent
>service to hr. Same result: cannot find a working URL.
>
>I cannot beleive that the virtual path must equal the web agent service
>name. And if so, how can I use the default web agent?
>

the default web agent will be used when

  • you map a virtual path (eg: /a/b/c) to the physical path $ORACLE_HOME/ows/bin
  • you use the url /a/b/c/owa/xxx
  • there exists no entry for c in the web agent listing. Then the owa program will look for an entry named owa_default_service and use the connection information there.

>Thank you very much for your kind help,
>Peter (bruhn_at_wu-wien.ac.at)
>

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com

  • Check out Oracle Governments web site! ----- Follow the link to "Tech Center" and then downloadable Utilities for some free software...

statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Wed Feb 12 1997 - 00:00:00 CET

Original text of this message