Home » Developer & Programmer » JDeveloper, Java & XML » PL/SQL Stored Procedure and Java Stored Procedure
PL/SQL Stored Procedure and Java Stored Procedure [message #123395] Mon, 13 June 2005 03:10 Go to next message
gh0st
Messages: 1
Registered: June 2005
Junior Member
Hi,

I am pretty new and unexperienced in the Oracle environment so please forgive me any stupid questions. Razz

I want to Use an JavaSP to parse a XML-String, recieved as an Argument when invoked by an Stored Procedure. The JSP returns an String as well, wich will be further processed in the PL/SQL SP.

Up to now I never have worked with this, so i have a full load of questions...
1.) How do I create an JSP, which can be invoked by an PL/SQL SP?
2.) How do I invoke it with the arguments an revieve the return value
3.) Maybe someone can give me a link to a good beginners tutorial / step by step introduction, up to new I havn´t found anything, that fits my needs.

I use Oracle 9i (9.02)

Thanks,
-gh0st

[Updated on: Mon, 13 June 2005 06:42]

Report message to a moderator

Re: PL/SQL Stored Procedure and Java Stored Procedure [message #123484 is a reply to message #123395] Mon, 13 June 2005 13:06 Go to previous message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
For the bit about calling Java from PL/SQL:

CREATE OR REPLACE JAVA SOURCE NAMED "Host"
AS
	public class Host {
		public static String getOSName() {
			return (System.getProperty("os.name"));
		}
	};
/

show errors

CREATE OR REPLACE FUNCTION os_name
	RETURN VARCHAR2
AS
	LANGUAGE JAVA
	NAME 'Host.getOSName() return java.lang.String';
/

show errors

SELECT os_name FROM dual;

This is based on an example by Tom Kyte at asktom.oracle.com.
Previous Topic: how to run Java JDBC-Applet in Internet Explorer Browser?
Next Topic: jsp pages
Goto Forum:
  


Current Time: Mon Nov 25 11:31:06 CST 2024