• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Java Stored Procedure

 
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[])';
 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!