my dog learned polymorphism
The moose likes EJB and other Java EE Technologies and the fly likes JSP and EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JSP and EJB" Watch "JSP and EJB" New topic


Sanjeev Shahi
Ranch Hand

Joined: Feb 26, 2001
Posts: 83
Hi! all
If I am making an application in which JSP interacts with Enterprise bean which in turn interacts with Oracle. If I am creating a Session bean whose work is to fetch employee id on the basis of name passed by the client. So, my ques. is .....
1. What code I'll write in Session bean in order to connect to Oracle and can I use Prepared statement for query?
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
This is more of a JDBC question.
You will identify the oracle driver and database.
You will execute the query using sql and JDBC apis provided by JDK and also oracle java related classes.(you need the oracle related jar files in the path)
There should be some example for this in oracle website or the web site of the app server you are using. This should be useful as a starting point for you.
You can always log or debug your query statement and returned output.
Have fun,

SCJP, blog
I agree. Here's the link:
subject: JSP and EJB
It's not a secret anymore!