Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Web Tookit Problem - Still!

Re: Web Tookit Problem - Still!

From: Frank Hubeny <fhubeny_at_ntsource.com>
Date: Sat, 18 Sep 1999 01:36:33 -0500
Message-ID: <37E332F0.89254763@ntsource.com>


Just to see if I could reproduce the problem, I created a procedure

create or replace procedure displayfdf is begin
owa_util.mime_header('application/octet-stream'); htp.p('help');
end;
/

on a machine containing a webDB 2.1 and a machine containing OAS 4.0.7.

On both machines, after requesting the appropriate URL, I received a message asking me to "Save As" using a Netscape 4.61 browser. So I saved it and received a file with the words "help" in it.

However, with Internet Explorer 5, I simply received the text "help" in the browser. There was no prompt to save a file. The "Content-type" was not, however, part of the browser display as you apparently experienced.

I have used the owa_util.mime_header in the past to send fdf files which load pdf forms without any real problem except that I had to make sure the procedure in the package was called "fdf" so that Internet Explorer would recognize the content as an fdf file.

Frank Hubeny

Milo Remington wrote:

> Ok, i'm still having a problem using the Web Toolkit.
>
> Background:
>
> I have this HTML form where depending on the options the user selects
> there are times when I want to return a data stream to the user
> instead of HTML. I want that little dialog box to come up in their
> browser that asks them where they want to save the file and what to
> name it. I suspect that I need to change the mime type but how and
> what to? Can I use htp.print to do everything like:
> htp.print('content-type ??/??\n\n');
> htp.print('first line of data');
> htp.print('next line of data');
> etc...
>
> Is that how or do I need to use something else in the toolkit?
>
> Thanks!
>
> I'm using PL/SQL 2.3, Oracle Server 7.3.4, and OAS 4.?
>
> I got some good suggestions:
> Use owa_util.mime_header('??/??');
> replacing ??/?? with application/octet-stream or file/data (tried
> both).
>
> So I do the owa_ulti.mime_header call and then I do a htp.print for
> each line of data I want to send to go into the file on the users PC.
> I made double and triple sure I'm not making any htp.* or other web
> toolkit calls before I do the owa_util.mime_header.
>
> Here is what shows up at the browser when I look at the source:
> Content-length: 10741
> Content-type: file/data
>
> dataline1
> dateline2
> etc...
>
> That is what the source looks like, the browser screen just shows all
> the text run together. Like I said I tried both file/data and
> application/octet-stream and all that changes is what is shown after
> the Content-type:.
>
> It acts like the mime_header call isn't actually changing the mime
> type - it isn't actually in the header, it's just part of the data. I
> have no idea where the Content-length: line is comming from.
>
> So what is going on here? Do I have an old version of the owa_util
> package? Is there a configuration problem on the OWA? I'm stumped!
>
> Thanks for your help!
>
> "Let us pass over the river, and rest
> Under the shade of the trees."
Received on Sat Sep 18 1999 - 01:36:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US