Calling Webserver Packages from Java

From: Donald G. Bowles <dbowles_at_praca.ksc.nasa.gov>
Date: 1998/03/24
Message-ID: <6f8rt9$cdv_at_niven.ksc.nasa.gov>#1/1


Hi,

I have written several packages that create HTML reports on the fly using the Oracle Webserver HTP and OWA packages.

I have a Java program that I would like to call my stored packages using a CallableStatement object. My question is how do I get the Java call to my package to
return the HTML that gets generated?

Here is a very simple example using a stored procedure:

Procedure java_test IS

Begin

    htp.print('Hello World');
END; When I call the procedure from my Webserver I get a page returned to the browser client with "Hello World".

From my Java program


PrintStream out_file = new PrintStream( new FileOutputStream( "target_file.html" ) ); CallableStatement exec_report = misc_conn.prepareCall(

        "{call java_test}");
outfile.println(exec_report.executeUpdate());

The only thing that appears in the target_file.html is a "0".

Anyone have any ideas? Received on Tue Mar 24 1998 - 00:00:00 CET

Original text of this message