开发者

oracle connection in jsp [closed]

开发者_运维知识库 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

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.


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:

  • Displaying resultset in JSP
  • Places where Javabeans are used
  • DAO tutorial - Basic introduction to a JDBC DAO
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜