• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Stored Procedure  RSS feed

 
Pol Appan
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using a Java Stored Procedure called MailSend.java which has a method to send email and can take 8 parameters. I deployed the procedure using JDeveloper to Oracle database. It created a procedure called main in the database and a class file under java classes.

Now how do I call the function from a JSP page becuase I can find only one string parameter in the procedure.Pasted below is the procedure:

Please help me in this, I am new to this

Thanks

Cosmos

PROCEDURE main (p1 IN VARCHAR2) AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'MailSend.main(java.lang.String[])';
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like any other stored procedure. Check the JDBC and Oracle documentation for details.
 
Pol Appan
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any tutorial or documentation in relation to calling a java stored procedure from JSP and Java?

Thanks

Cosmos
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
read above: there is NO difference between stored procedures written in Java or any other language as far as JDBC is concerned.
Check your Oracle documentation for the JDBC driver and a JDBC tutorial on how to use stored procedures.
Check a JSP/Servlet tutorial on how to write a JSP page and a servlet.
Combine the knowledge you gain from both to write a servlet or JSP page or a servlet that uses stored procedures.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!