Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP and EJB

 
Sanjeev Shahi
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
thank,
SS
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Kishore.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic