views:

32

answers:

1

firstly i am a total newbie for both jsp as well as oracle.

i just want to know the steps for connecting an oracle 10g database with a jsp page.

+3  A: 

Here are the steps.

  1. Don't do this in a JSP file. Do this in a Java class.

  2. Read the JDBC tutorial. You can download the Oracle JDBC driver here and find Oracle-specific JDBC documentation here (code samples starts in chapter 3). Play around it in a simple Java class with a main() method in an IDE or CMD as long until you get the grasp. May take a day or two. It boils down to loading the JDBC driver, getting a DB connection and then executing the query on it.

  3. Create a Javabean class which represents a single entity containing information of a single table row. Create a DAO (Data Access Object) class which offers methods to create, read, update and delete the entity/entities. Test it thoroughly using a simple Java class with a main().

  4. Create a Servlet class which has the doGet() and/or doPost() methods implemented according to the functional requirements and uses the DAO class to obtain or persist the entities of interest.

Related questions:

BalusC