-1

I am new to both jsp as well as oracle.

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

Mxyk
  • 10,678
  • 16
  • 57
  • 76
user161004
  • 975
  • 3
  • 14
  • 23

1 Answers1

5

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:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555